aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2017-07-23 08:41:35 +0000
committerFrançois Dumont <fdumont@gcc.gnu.org>2017-07-23 08:41:35 +0000
commit4a15d84228ee29d55cd011094f82c8d4fa9a5a76 (patch)
treea69d765d4e4329c2f05c93f016dce503324d9641 /libstdc++-v3/include/std
parentab45a34c442b338c08537f0ca8ce1c1eca65cfd3 (diff)
downloadgcc-4a15d84228ee29d55cd011094f82c8d4fa9a5a76.zip
gcc-4a15d84228ee29d55cd011094f82c8d4fa9a5a76.tar.gz
gcc-4a15d84228ee29d55cd011094f82c8d4fa9a5a76.tar.bz2
re PR libstdc++/81064 (Inline namespace regression)
2017-07-23 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/81064 * include/bits/algorithmfwd.h: Reorganize versioned namespace. * include/bits/basic_string.h: Likewise. * include/bits/c++config: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/forward_list.tcc: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/list.tcc: Likewise. * include/bits/move.h: Likewise. * include/bits/quoted_string.h: Likewise. * include/bits/random.h: Likewise. * include/bits/random.tcc: Likewise. * include/bits/regex.h: Likewise. * include/bits/regex.tcc: Likewise. * include/bits/regex_automaton.h: Likewise. * include/bits/regex_automaton.tcc: Likewise. * include/bits/regex_compiler.h: Likewise. * include/bits/regex_compiler.tcc: Likewise. * include/bits/regex_constants.h: Likewise. * include/bits/regex_error.h: Likewise. * include/bits/regex_executor.h: Likewise. * include/bits/regex_executor.tcc: Likewise. * include/bits/regex_scanner.h: Likewise. * include/bits/regex_scanner.tcc: Likewise. * include/bits/specfun.h: Likewise. * include/bits/stl_algo.h: Likewise. * include/bits/stl_algobase.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_iterator.h: Likewise. * include/bits/stl_iterator_base_funcs.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_relops.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/uniform_int_dist.h: Likewise. * include/bits/unordered_map.h: Likewise. * include/bits/unordered_set.h: Likewise. * include/bits/vector.tcc: Likewise. * include/c_global/cmath: Likewise. * include/c_std/cmath: Likewise. * include/decimal/decimal: Likewise. * include/decimal/decimal.h: Likewise. * include/experimental/algorithm: Likewise. * include/experimental/any: Likewise. * include/experimental/array: Likewise. * include/experimental/bits/erase_if.h: Likewise. * include/experimental/bits/fs_dir.h: Likewise. * include/experimental/bits/fs_fwd.h: Likewise. * include/experimental/bits/fs_ops.h: Likewise. * include/experimental/bits/fs_path.h: Likewise. * include/experimental/bits/lfts_config.h: Likewise. * include/experimental/bits/shared_ptr.h: Likewise. * include/experimental/bits/string_view.tcc: Likewise. * include/experimental/chrono: Likewise. * include/experimental/deque: Likewise. * include/experimental/filesystem: Likewise. * include/experimental/forward_list: Likewise. * include/experimental/functional: Likewise. * include/experimental/iterator: Likewise. * include/experimental/list: Likewise. * include/experimental/map: Likewise. * include/experimental/memory: Likewise. * include/experimental/memory_resource: Likewise. * include/experimental/numeric: Likewise. * include/experimental/optional: Likewise. * include/experimental/propagate_const: Likewise. * include/experimental/random: Likewise. * include/experimental/ratio: Likewise. * include/experimental/regex: Likewise. * include/experimental/set: Likewise. * include/experimental/source_location: Likewise. * include/experimental/string: Likewise. * include/experimental/string_view: Likewise. * include/experimental/system_error: Likewise. * include/experimental/tuple: Likewise. * include/experimental/type_traits: Likewise. * include/experimental/unordered_map: Likewise. * include/experimental/unordered_set: Likewise. * include/experimental/utility: Likewise. * include/experimental/vector: Likewise. * include/ext/bitmap_allocator.h: Likewise. * include/ext/codecvt_specializations.h: Likewise. * include/ext/rope: Likewise. * include/ext/typelist.h: Likewise. * include/std/chrono: Likewise. * include/std/complex: Likewise. * include/std/functional: Likewise. * include/std/numeric: Likewise. * include/std/string_view: Likewise. * include/std/thread: Likewise. * include/std/variant: Likewise. * include/tr1/array: Likewise. * include/tr1/bessel_function.tcc: Likewise. * include/tr1/beta_function.tcc: Likewise. * include/tr1/cmath: Likewise. * include/tr1/complex: Likewise. * include/tr1/ell_integral.tcc: Likewise. * include/tr1/exp_integral.tcc: Likewise. * include/tr1/functional: Likewise. * include/tr1/functional_hash.h: Likewise. * include/tr1/gamma.tcc: Likewise. * include/tr1/hashtable.h: Likewise. * include/tr1/hashtable_policy.h: Likewise. * include/tr1/hypergeometric.tcc: Likewise. * include/tr1/legendre_function.tcc: Likewise. * include/tr1/modified_bessel_func.tcc: Likewise. * include/tr1/poly_hermite.tcc: Likewise. * include/tr1/poly_laguerre.tcc: Likewise. * include/tr1/random.h: Likewise. * include/tr1/random.tcc: Likewise. * include/tr1/regex: Likewise. * include/tr1/riemann_zeta.tcc: Likewise. * include/tr1/shared_ptr.h: Likewise. * include/tr1/special_function_util.h: Likewise. * include/tr1/tuple: Likewise. * include/tr1/type_traits: Likewise. * include/tr1/unordered_map.h: Likewise. * include/tr1/unordered_set.h: Likewise. * include/tr1/utility: Likewise. * include/tr2/bool_set: Likewise. * include/tr2/bool_set.tcc: Likewise. * include/tr2/dynamic_bitset: Likewise. * include/tr2/dynamic_bitset.tcc: Likewise. * include/tr2/ratio: Likewise. * include/tr2/type_traits: Likewise. * src/c++11/chrono.cc: Likewise. * src/c++11/compatibility-c++0x.cc: Likewise. * src/c++11/compatibility-chrono.cc: Likewise. * src/c++11/cxx11-shim_facets.cc: Likewise. * src/c++11/hashtable_c++0x.cc: Likewise. * src/c++11/placeholders.cc: Likewise. * src/c++11/thread.cc: Likewise. * src/c++98/bitmap_allocator.cc: Likewise. * src/c++98/hashtable_tr1.cc: Likewise. * src/c++98/list.cc: Likewise. * src/shared/hashtable-aux.cc: Likewise. * testsuite/20_util/duration/literals/range.cc: Adapt line number. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise. * testsuite/20_util/forward/c_neg.cc: Likewise. * testsuite/20_util/forward/f_neg.cc: Likewise. * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise. * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. * testsuite/26_numerics/random/pr60037-neg.cc: Likewise. * python/libstdcxx/v6/printers.py: Adapt. From-SVN: r250458
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r--libstdc++-v3/include/std/chrono25
-rw-r--r--libstdc++-v3/include/std/complex6
-rw-r--r--libstdc++-v3/include/std/functional6
-rw-r--r--libstdc++-v3/include/std/numeric10
-rw-r--r--libstdc++-v3/include/std/string_view11
-rw-r--r--libstdc++-v3/include/std/thread7
-rw-r--r--libstdc++-v3/include/std/variant105
7 files changed, 55 insertions, 115 deletions
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index c3a6ba8..1bcbf52 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -45,6 +45,8 @@
namespace std _GLIBCXX_VISIBILITY(default)
{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
/**
* @defgroup chrono Time
* @ingroup utilities
@@ -58,19 +60,13 @@ namespace std _GLIBCXX_VISIBILITY(default)
*/
namespace chrono
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<typename _Rep, typename _Period = ratio<1>>
struct duration;
template<typename _Clock, typename _Dur = typename _Clock::duration>
struct time_point;
-
- _GLIBCXX_END_NAMESPACE_VERSION
}
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
// 20.11.4.3 specialization of common_type (for duration, sfinae-friendly)
template<typename _CT, typename _Period1, typename _Period2>
@@ -117,12 +113,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
common_type<_Duration1, _Duration2>>::type, _Clock>::type
{ };
-_GLIBCXX_END_NAMESPACE_VERSION
-
namespace chrono
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
// Primary template for duration_cast impl.
template<typename _ToDur, typename _CF, typename _CR,
bool _NumIsOne = false, bool _DenIsOne = false>
@@ -871,8 +863,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
using high_resolution_clock = system_clock;
} // end inline namespace _V2
-
- _GLIBCXX_END_NAMESPACE_VERSION
} // namespace chrono
#if __cplusplus > 201103L
@@ -883,8 +873,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
{
inline namespace chrono_literals
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<typename _Rep, unsigned long long _Val>
struct _Checked_integral_constant
: integral_constant<_Rep, static_cast<_Rep>(_Val)>
@@ -959,22 +947,19 @@ _GLIBCXX_END_NAMESPACE_VERSION
operator""ns()
{ return __check_overflow<chrono::nanoseconds, _Digits...>(); }
- _GLIBCXX_END_NAMESPACE_VERSION
} // inline namespace chrono_literals
} // inline namespace literals
namespace chrono
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
- using namespace literals::chrono_literals;
-
- _GLIBCXX_END_NAMESPACE_VERSION
+ using namespace literals::chrono_literals;
} // namespace chrono
#endif // __cplusplus > 201103L
// @} group chrono
+
+_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif //_GLIBCXX_USE_C99_STDINT_TR1
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 6342c98..bd8b09d 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -1937,14 +1937,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return std::complex<__type>(__x, -__type());
}
-_GLIBCXX_END_NAMESPACE_VERSION
-
#if __cplusplus > 201103L
inline namespace literals {
inline namespace complex_literals {
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
#define __cpp_lib_complex_udls 201309
constexpr std::complex<float>
@@ -1971,12 +1967,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator""il(unsigned long long __num)
{ return std::complex<long double>{0.0L, static_cast<long double>(__num)}; }
-_GLIBCXX_END_NAMESPACE_VERSION
} // inline namespace complex_literals
} // inline namespace literals
#endif // C++14
+_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif // C++11
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 465b3ec..a6d121b 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -259,15 +259,12 @@ _GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
*/
template<int _Num> struct _Placeholder { };
- _GLIBCXX_END_NAMESPACE_VERSION
-
/** @namespace std::placeholders
* @brief ISO C++11 entities sub-namespace for functional.
* @ingroup binders
*/
namespace placeholders
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
/* Define a large number of placeholders. There is no way to
* simplify this with variadic templates, because we're introducing
* unique names for each.
@@ -301,11 +298,8 @@ _GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
extern const _Placeholder<27> _27;
extern const _Placeholder<28> _28;
extern const _Placeholder<29> _29;
- _GLIBCXX_END_NAMESPACE_VERSION
}
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
/**
* Partial specialization of is_placeholder that provides the placeholder
* number for the placeholder objects defined by libstdc++.
diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric
index c7abbc1..17d629d 100644
--- a/libstdc++-v3/include/std/numeric
+++ b/libstdc++-v3/include/std/numeric
@@ -79,10 +79,10 @@
namespace std _GLIBCXX_VISIBILITY(default)
{
-namespace __detail
-{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+namespace __detail
+{
// std::abs is not constexpr and doesn't support unsigned integers.
template<typename _Tp>
constexpr
@@ -117,11 +117,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* __detail::__abs_integral(__n)
: 0;
}
-
-_GLIBCXX_END_NAMESPACE_VERSION
-}
-
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
+} // namespace __detail
#if __cplusplus > 201402L
diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view
index 311d6d7..88a7686 100644
--- a/libstdc++-v3/include/std/string_view
+++ b/libstdc++-v3/include/std/string_view
@@ -427,23 +427,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
size_t _M_len;
const _CharT* _M_str;
};
-_GLIBCXX_END_NAMESPACE_VERSION
// [string.view.comparison], non-member basic_string_view comparison function
namespace __detail
{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Identity transform to create a non-deduced context, so that only one
// argument participates in template argument deduction and the other
// argument gets implicitly converted to the deduced type. See n3766.html.
template<typename _Tp>
using __idt = common_type_t<_Tp>;
-_GLIBCXX_END_NAMESPACE_VERSION
}
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<typename _CharT, typename _Traits>
inline bool
operator==(basic_string_view<_CharT, _Traits> __x,
@@ -634,14 +629,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __is_fast_hash<hash<u32string_view>> : std::false_type
{ };
#endif
-_GLIBCXX_END_NAMESPACE_VERSION
inline namespace literals
{
inline namespace string_view_literals
{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
inline constexpr basic_string_view<char>
operator""sv(const char* __str, size_t __len)
{ return basic_string_view<char>{__str, __len}; }
@@ -661,11 +653,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator""sv(const char32_t* __str, size_t __len)
{ return basic_string_view<char32_t>{__str, __len}; }
#endif
-
-_GLIBCXX_END_NAMESPACE_VERSION
} // namespace string_literals
} // namespace literals
+_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#include <bits/string_view.tcc>
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index 8e2cb68..17db5ce 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -321,16 +321,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __out << __id._M_thread;
}
-_GLIBCXX_END_NAMESPACE_VERSION
-
/** @namespace std::this_thread
* @brief ISO C++ 2011 entities sub-namespace for thread.
* 30.3.2 Namespace this_thread.
*/
namespace this_thread
{
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
/// get_id
inline thread::id
get_id() noexcept
@@ -398,12 +394,11 @@ _GLIBCXX_END_NAMESPACE_VERSION
__now = _Clock::now();
}
}
-
- _GLIBCXX_END_NAMESPACE_VERSION
}
// @} group threads
+_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 23db6d2..d0c22e3 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -50,12 +50,12 @@
namespace std _GLIBCXX_VISIBILITY(default)
{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
namespace __detail
{
namespace __variant
{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<size_t _Np, typename... _Types>
struct _Nth_type;
@@ -67,12 +67,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Nth_type<0, _First, _Rest...>
{ using type = _First; };
-_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __variant
} // namespace __detail
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<typename... _Types> class tuple;
template<typename... _Types> class variant;
template <typename> struct hash;
@@ -141,13 +138,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr variant_alternative_t<_Np, variant<_Types...>> const&&
get(const variant<_Types...>&&);
-_GLIBCXX_END_NAMESPACE_VERSION
-
namespace __detail
{
namespace __variant
{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Returns the first apparence of _Tp in _Types.
// Returns sizeof...(_Types) if _Tp is not in _Types.
template<typename _Tp, typename... _Types>
@@ -299,40 +293,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Traits
{
static constexpr bool _S_default_ctor =
- is_default_constructible_v<typename _Nth_type<0, _Types...>::type>;
+ is_default_constructible_v<typename _Nth_type<0, _Types...>::type>;
static constexpr bool _S_copy_ctor =
- (is_copy_constructible_v<_Types> && ...);
+ (is_copy_constructible_v<_Types> && ...);
static constexpr bool _S_move_ctor =
- (is_move_constructible_v<_Types> && ...);
+ (is_move_constructible_v<_Types> && ...);
static constexpr bool _S_copy_assign =
- _S_copy_ctor && _S_move_ctor
- && (is_copy_assignable_v<_Types> && ...);
+ _S_copy_ctor && _S_move_ctor
+ && (is_copy_assignable_v<_Types> && ...);
static constexpr bool _S_move_assign =
- _S_move_ctor
- && (is_move_assignable_v<_Types> && ...);
+ _S_move_ctor
+ && (is_move_assignable_v<_Types> && ...);
static constexpr bool _S_trivial_dtor =
- (is_trivially_destructible_v<_Types> && ...);
+ (is_trivially_destructible_v<_Types> && ...);
static constexpr bool _S_trivial_copy_ctor =
- (is_trivially_copy_constructible_v<_Types> && ...);
+ (is_trivially_copy_constructible_v<_Types> && ...);
static constexpr bool _S_trivial_move_ctor =
- (is_trivially_move_constructible_v<_Types> && ...);
+ (is_trivially_move_constructible_v<_Types> && ...);
static constexpr bool _S_trivial_copy_assign =
- _S_trivial_dtor && (is_trivially_copy_assignable_v<_Types> && ...);
+ _S_trivial_dtor && (is_trivially_copy_assignable_v<_Types> && ...);
static constexpr bool _S_trivial_move_assign =
- _S_trivial_dtor && (is_trivially_move_assignable_v<_Types> && ...);
+ _S_trivial_dtor && (is_trivially_move_assignable_v<_Types> && ...);
// The following nothrow traits are for non-trivial SMFs. Trivial SMFs
// are always nothrow.
static constexpr bool _S_nothrow_default_ctor =
- is_nothrow_default_constructible_v<
- typename _Nth_type<0, _Types...>::type>;
+ is_nothrow_default_constructible_v<
+ typename _Nth_type<0, _Types...>::type>;
static constexpr bool _S_nothrow_copy_ctor = false;
static constexpr bool _S_nothrow_move_ctor =
- (is_nothrow_move_constructible_v<_Types> && ...);
+ (is_nothrow_move_constructible_v<_Types> && ...);
static constexpr bool _S_nothrow_copy_assign = false;
static constexpr bool _S_nothrow_move_assign =
- _S_nothrow_move_ctor && (is_nothrow_move_assignable_v<_Types> && ...);
+ _S_nothrow_move_ctor && (is_nothrow_move_assignable_v<_Types> && ...);
};
// Defines members and ctors.
@@ -452,7 +446,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
using _Variant_storage_alias =
- _Variant_storage<_Traits<_Types...>::_S_trivial_dtor, _Types...>;
+ _Variant_storage<_Traits<_Types...>::_S_trivial_dtor, _Types...>;
// The following are (Copy|Move) (ctor|assign) layers for forwarding
// triviality and handling non-trivial SMF behaviors.
@@ -464,7 +458,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using _Base::_Base;
_Copy_ctor_base(const _Copy_ctor_base& __rhs)
- noexcept(_Traits<_Types...>::_S_nothrow_copy_ctor)
+ noexcept(_Traits<_Types...>::_S_nothrow_copy_ctor)
{
if (__rhs._M_valid())
{
@@ -489,7 +483,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
using _Copy_ctor_alias =
- _Copy_ctor_base<_Traits<_Types...>::_S_trivial_copy_ctor, _Types...>;
+ _Copy_ctor_base<_Traits<_Types...>::_S_trivial_copy_ctor, _Types...>;
template<bool, typename... _Types>
struct _Move_ctor_base : _Copy_ctor_alias<_Types...>
@@ -498,7 +492,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using _Base::_Base;
_Move_ctor_base(_Move_ctor_base&& __rhs)
- noexcept(_Traits<_Types...>::_S_nothrow_move_ctor)
+ noexcept(_Traits<_Types...>::_S_nothrow_move_ctor)
{
if (__rhs._M_valid())
{
@@ -523,7 +517,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
using _Move_ctor_alias =
- _Move_ctor_base<_Traits<_Types...>::_S_trivial_move_ctor, _Types...>;
+ _Move_ctor_base<_Traits<_Types...>::_S_trivial_move_ctor, _Types...>;
template<bool, typename... _Types>
struct _Copy_assign_base : _Move_ctor_alias<_Types...>
@@ -533,7 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Copy_assign_base&
operator=(const _Copy_assign_base& __rhs)
- noexcept(_Traits<_Types...>::_S_nothrow_copy_assign)
+ noexcept(_Traits<_Types...>::_S_nothrow_copy_assign)
{
if (this->_M_index == __rhs._M_index)
{
@@ -576,8 +570,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
using _Copy_assign_alias =
- _Copy_assign_base<_Traits<_Types...>::_S_trivial_copy_assign,
- _Types...>;
+ _Copy_assign_base<_Traits<_Types...>::_S_trivial_copy_assign,
+ _Types...>;
template<bool, typename... _Types>
struct _Move_assign_base : _Copy_assign_alias<_Types...>
@@ -601,7 +595,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Move_assign_base&
operator=(_Move_assign_base&& __rhs)
- noexcept(_Traits<_Types...>::_S_nothrow_move_assign)
+ noexcept(_Traits<_Types...>::_S_nothrow_move_assign)
{
if (this->_M_index == __rhs._M_index)
{
@@ -644,8 +638,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
using _Move_assign_alias =
- _Move_assign_base<_Traits<_Types...>::_S_trivial_move_assign,
- _Types...>;
+ _Move_assign_base<_Traits<_Types...>::_S_trivial_move_assign,
+ _Types...>;
template<typename... _Types>
struct _Variant_base : _Move_assign_alias<_Types...>
@@ -654,7 +648,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr
_Variant_base()
- noexcept(_Traits<_Types...>::_S_nothrow_default_ctor)
+ noexcept(_Traits<_Types...>::_S_nothrow_default_ctor)
: _Variant_base(in_place_index<0>) { }
template<size_t _Np, typename... _Args>
@@ -879,12 +873,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
std::index_sequence<__indices...>>
: _Base_dedup<__indices, __poison_hash<remove_const_t<_Types>>>... { };
-_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __variant
} // namespace __detail
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
template<typename _Tp, typename... _Types>
inline constexpr bool holds_alternative(const variant<_Types...>& __v)
noexcept
@@ -1041,13 +1032,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class variant
: private __detail::__variant::_Variant_base<_Types...>,
private _Enable_default_constructor<
- __detail::__variant::_Traits<_Types...>::_S_default_ctor,
+ __detail::__variant::_Traits<_Types...>::_S_default_ctor,
variant<_Types...>>,
private _Enable_copy_move<
- __detail::__variant::_Traits<_Types...>::_S_copy_ctor,
- __detail::__variant::_Traits<_Types...>::_S_copy_assign,
- __detail::__variant::_Traits<_Types...>::_S_move_ctor,
- __detail::__variant::_Traits<_Types...>::_S_move_assign,
+ __detail::__variant::_Traits<_Types...>::_S_copy_ctor,
+ __detail::__variant::_Traits<_Types...>::_S_copy_assign,
+ __detail::__variant::_Traits<_Types...>::_S_move_ctor,
+ __detail::__variant::_Traits<_Types...>::_S_move_assign,
variant<_Types...>>
{
private:
@@ -1060,9 +1051,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using _Base = __detail::__variant::_Variant_base<_Types...>;
using _Default_ctor_enabler =
- _Enable_default_constructor<
- __detail::__variant::_Traits<_Types...>::_S_default_ctor,
- variant<_Types...>>;
+ _Enable_default_constructor<
+ __detail::__variant::_Traits<_Types...>::_S_default_ctor,
+ variant<_Types...>>;
template<typename _Tp>
static constexpr bool
@@ -1108,7 +1099,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
variant(_Tp&& __t)
noexcept(is_nothrow_constructible_v<__accepted_type<_Tp&&>, _Tp&&>)
: variant(in_place_index<__accepted_index<_Tp&&>>,
- std::forward<_Tp>(__t))
+ std::forward<_Tp>(__t))
{ __glibcxx_assert(holds_alternative<__accepted_type<_Tp&&>>(*this)); }
template<typename _Tp, typename... _Args,
@@ -1117,7 +1108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr explicit
variant(in_place_type_t<_Tp>, _Args&&... __args)
: variant(in_place_index<__index_of<_Tp>>,
- std::forward<_Args>(__args)...)
+ std::forward<_Args>(__args)...)
{ __glibcxx_assert(holds_alternative<_Tp>(*this)); }
template<typename _Tp, typename _Up, typename... _Args,
@@ -1288,7 +1279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static constexpr bool \
(*_S_erased_##__NAME[])(const variant&, const variant&) = \
{ &__detail::__variant::__erased_##__NAME< \
- const variant&, __indices>... }; \
+ const variant&, __indices>... }; \
template<size_t... __indices> \
constexpr inline bool \
_M_##__NAME(const variant& __rhs, \
@@ -1312,18 +1303,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#undef _VARIANT_RELATION_FUNCTION_TEMPLATE
template<size_t _Np, typename _Vp>
- friend constexpr decltype(auto) __detail::__variant::
-#if _GLIBCXX_INLINE_VERSION
- __8:: // Required due to PR c++/59256
-#endif
- __get(_Vp&& __v);
+ friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& __v);
template<typename _Vp>
- friend void* __detail::__variant::
-#if _GLIBCXX_INLINE_VERSION
- __8:: // Required due to PR c++/59256
-#endif
- __get_storage(_Vp&& __v);
+ friend void* __detail::__variant::__get_storage(_Vp&& __v);
#define _VARIANT_RELATION_FUNCTION_TEMPLATE(__OP) \
template<typename... _Tp> \
@@ -1434,7 +1417,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename... _Types>
struct hash<variant<_Types...>>
: private __detail::__variant::_Variant_hash_base<
- variant<_Types...>, std::index_sequence_for<_Types...>>,
+ variant<_Types...>, std::index_sequence_for<_Types...>>,
public __variant_hash_call_base<_Types...>
{
using result_type = size_t;