diff --git a/libstdc++-v3/doc/doxygen/doxygroups.cc b/libstdc++-v3/doc/doxygen/doxygroups.cc index 27d4a5e20ba..00d945ceba0 100644 --- a/libstdc++-v3/doc/doxygen/doxygroups.cc +++ b/libstdc++-v3/doc/doxygen/doxygroups.cc @@ -164,6 +164,21 @@ summarized in tables. */ * and condition variables. */ +/** + * @defgroup variable_templates Variable Templates + * @ingroup metaprogramming + * @since C++17 + * + * Each trait in `` that has a `value` static data member is + * also available as a variable template, using the same name with a `_v` + * suffix. For example, `std::is_integral_v` is a `bool` constant with + * the same value as `std::is_integral::value`. + * + * In some cases, using the variable template instead of the `::value` member + * avoids instantiating the class template for the trait. This gives the + * compiler less work to do and can make your code compile a little faster. + */ + /** * @defgroup experimental Technical Specifications * diff --git a/libstdc++-v3/include/bits/binders.h b/libstdc++-v3/include/bits/binders.h index 972471745bd..51dba4cb446 100644 --- a/libstdc++-v3/include/bits/binders.h +++ b/libstdc++-v3/include/bits/binders.h @@ -23,7 +23,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file include/bits/binder.h +/** @file include/bits/binders.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ diff --git a/libstdc++-v3/include/bits/formatfwd.h b/libstdc++-v3/include/bits/formatfwd.h index d2dfb17492d..d28ca70b7d8 100644 --- a/libstdc++-v3/include/bits/formatfwd.h +++ b/libstdc++-v3/include/bits/formatfwd.h @@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // [format.formatter], formatter template struct formatter; +/// @cond undocumented namespace __format { #ifdef _GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 025486646f3..7b333b3b0b6 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -1461,7 +1461,7 @@ namespace __fwdlist * * This function will insert copies of the data in the range * `[ __first, __last)` into the %forward_list after the - * location specified by `__pos. + * location specified by `__pos`. * * This operation is linear in the number of elements inserted and * does not invalidate iterators and references. diff --git a/libstdc++-v3/include/bits/out_ptr.h b/libstdc++-v3/include/bits/out_ptr.h index 48fe3475b2f..cc5a8a3adac 100644 --- a/libstdc++-v3/include/bits/out_ptr.h +++ b/libstdc++-v3/include/bits/out_ptr.h @@ -396,7 +396,7 @@ namespace __detail /** * @tparam _Pointer The type of pointer to convert to. * @param __s The pointer that should take ownership of the result. - * @param __args... Arguments to use when resetting the smart pointer. + * @param __args Pack of arguments to use when resetting the smart pointer. * @return A `std::out_ptr_t` referring to `__s`. * @since C++23 * @headerfile @@ -417,7 +417,7 @@ namespace __detail /** * @tparam _Pointer The type of pointer to convert to. * @param __s The pointer that should take ownership of the result. - * @param __args... Arguments to use when resetting the smart pointer. + * @param __args Pack of arguments to use when resetting the smart pointer. * @return A `std::inout_ptr_t` referring to `__s`. * @since C++23 * @headerfile diff --git a/libstdc++-v3/include/bits/regex_constants.h b/libstdc++-v3/include/bits/regex_constants.h index 32b9de1000b..e18f162196e 100644 --- a/libstdc++-v3/include/bits/regex_constants.h +++ b/libstdc++-v3/include/bits/regex_constants.h @@ -335,9 +335,9 @@ namespace regex_constants * Format strings (from ECMA-262 [15.5.4.11]): * @li $$ The dollar-sign itself ($) * @li $& The matched substring. - * @li $` The portion of @a string that precedes the matched substring. + * @li $\` The portion of the string that precedes the matched substring. * This would be match_results::prefix(). - * @li $' The portion of @a string that follows the matched substring. + * @li $' The portion of the string that follows the matched substring. * This would be match_results::suffix(). * @li $n The nth capture, where n is in [1,9] and $n is not followed by a * decimal digit. If n <= match_results::size() and the nth capture diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 1e119a95b5c..88a8faab924 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -1096,6 +1096,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * is assigned from __obj. * * Insertion requires logarithmic time. + * @{ */ template pair diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index efe6f72569b..aa49f87fc13 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -101,9 +101,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Index_tuple; - template - class complex; - template constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& get(pair<_Tp1, _Tp2>& __in) noexcept; @@ -153,6 +150,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION get(const array<_Tp, _Nm>&&) noexcept; #if __glibcxx_tuple_like >= 202311 // >= C++26 + template + class complex; + template constexpr _Tp& get(complex<_Tp>&) noexcept; @@ -233,8 +233,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; #endif // lib concepts + /// @endcond #endif // C++11 + /// @cond undocumented + #if __glibcxx_tuple_like // >= C++23 template inline constexpr bool __is_tuple_v = false; diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index 14825cc05ac..ce35e28cde7 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -585,6 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * to the first is returned. * * Insertion requires logarithmic time (if the hint is not taken). + * @{ */ iterator insert(const_iterator __position, const value_type& __x) diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 314c0f6ac4a..91478d3e9fb 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -148,9 +148,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #endif // __cpp_lib_invoke_r +#if __cplusplus >= 201103L /// @cond undocumented -#if __cplusplus >= 201103L template::value> class _Mem_fn_base diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index a7f881fe973..bba7a3fd03d 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -2484,15 +2484,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const size_t aligned_union<_Len, _Types...>::alignment_value; #pragma GCC diagnostic pop - /// @cond undocumented - + // Decay trait for arrays and functions, used for perfect forwarding + // in make_pair, make_tuple, etc. #if _GLIBCXX_USE_BUILTIN_TRAIT(__decay) template struct decay { using type = __decay(_Tp); }; #else - // Decay trait for arrays and functions, used for perfect forwarding - // in make_pair, make_tuple, etc. + /// @cond undocumented + template struct __decay_selector : __conditional_t::value, // false for functions diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index 0ae01be25dd..ab3e06da9f7 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -134,8 +134,8 @@ namespace std _GLIBCXX_VISIBILITY(default) * stack unwinding [15.2]. end note]' * * 2: 'When `uncaught_exception()` is true, throwing an - * %exception can result in a call of 1terminate()` - * (15.5.1).' + * %exception can result in a call of `terminate()` + * (15.5.1). */ _GLIBCXX17_DEPRECATED_SUGGEST("std::uncaught_exceptions()") bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));