From bbb901fa67d0cd47565bb9972beb367ae264ec69 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:34 +0000 Subject: [PATCH] Vendor import of libc++ release_60 branch r321788: https://llvm.org/svn/llvm-project/libcxx/branches/release_60@321788 --- CMakeLists.txt | 2 +- CREDITS.TXT | 2 +- include/__config | 19 +- include/__functional_base | 4 +- include/__mutex_base | 6 +- include/chrono | 5 +- include/functional | 28 +- include/memory | 5 +- include/mutex | 6 +- include/optional | 4 +- include/ratio | 30 +- include/system_error | 8 +- include/tuple | 8 +- include/type_traits | 410 +++++++++++------- include/utility | 19 +- include/variant | 8 +- .../list/list.ops/sort_comp.pass.cpp | 41 ++ ...has_unique_object_representations.pass.cpp | 104 +++++ www/cxx1z_status.html | 14 +- 19 files changed, 490 insertions(+), 233 deletions(-) create mode 100644 test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 29eef8f35dbc..eb079d256181 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 6.0.0svn) + set(PACKAGE_VERSION 6.0.0) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") diff --git a/CREDITS.TXT b/CREDITS.TXT index 88d923a48e91..46a06c6eab08 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -101,7 +101,7 @@ E: nico.rieck@gmail.com D: Windows fixes N: Jon Roelofs -E: jonathan@codesourcery.com +E: jroelofS@jroelofs.com D: Remote testing, Newlib port, baremetal/single-threaded support. N: Jonathan Sauer diff --git a/include/__config b/include/__config index d0f95ef28342..a4dfc41736c9 100644 --- a/include/__config +++ b/include/__config @@ -461,7 +461,11 @@ namespace std { #endif #if __has_builtin(__builtin_launder) -#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#endif + +#if !__is_identifier(__has_unique_object_representations) +#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS #endif #elif defined(_LIBCPP_COMPILER_GCC) @@ -547,7 +551,11 @@ namespace std { #endif #if _GNUC_VER >= 700 -#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#endif + +#if _GNUC_VER >= 700 +#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS #endif #elif defined(_LIBCPP_COMPILER_MSVC) @@ -980,9 +988,10 @@ template struct __static_assert_check {}; #define _LIBCPP_NODISCARD_AFTER_CXX17 #endif -// FIXME: Remove all usages of this macro once compilers catch up. -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L) -# define _LIBCPP_HAS_NO_INLINE_VARIABLES +#if _LIBCPP_STD_VER > 14 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# define _LIBCPP_INLINE_VAR inline +#else +# define _LIBCPP_INLINE_VAR #endif #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES diff --git a/include/__functional_base b/include/__functional_base index 79017fe759b4..12af4dc96751 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -564,7 +564,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_MEMORY) extern const allocator_arg_t allocator_arg; #else -constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +/* _LIBCPP_INLINE_VAR */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); #endif // uses_allocator @@ -601,7 +601,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator #if _LIBCPP_STD_VER > 14 template -constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; +_LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; #endif #ifndef _LIBCPP_CXX03_LANG diff --git a/include/__mutex_base b/include/__mutex_base index 3b2453f1ba1a..402a52d945e1 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -82,9 +82,9 @@ extern const adopt_lock_t adopt_lock; #else -constexpr defer_lock_t defer_lock = defer_lock_t(); -constexpr try_to_lock_t try_to_lock = try_to_lock_t(); -constexpr adopt_lock_t adopt_lock = adopt_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr defer_lock_t defer_lock = defer_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr adopt_lock_t adopt_lock = adopt_lock_t(); #endif diff --git a/include/chrono b/include/chrono index c69e88ae4ded..809f773b6c6b 100644 --- a/include/chrono +++ b/include/chrono @@ -26,7 +26,7 @@ duration_cast(const duration& fd); template struct treat_as_floating_point : is_floating_point {}; -template constexpr bool treat_as_floating_point_v +template inline constexpr bool treat_as_floating_point_v = treat_as_floating_point::value; // C++17 template @@ -419,7 +419,8 @@ template struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool treat_as_floating_point_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; #endif diff --git a/include/functional b/include/functional index f73c3ca56a8e..3e5215b137b5 100644 --- a/include/functional +++ b/include/functional @@ -213,9 +213,9 @@ template struct is_bind_expression; template struct is_placeholder; // See C++14 20.9.9, Function object binders -template constexpr bool is_bind_expression_v +template inline constexpr bool is_bind_expression_v = is_bind_expression::value; // C++17 -template constexpr int is_placeholder_v +template inline constexpr int is_placeholder_v = is_placeholder::value; // C++17 @@ -1991,7 +1991,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_bind_expression #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; #endif template struct __is_placeholder : public integral_constant {}; @@ -2000,7 +2000,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_placeholder #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; #endif namespace placeholders @@ -2020,16 +2020,16 @@ _LIBCPP_FUNC_VIS extern const __ph<8> _8; _LIBCPP_FUNC_VIS extern const __ph<9> _9; _LIBCPP_FUNC_VIS extern const __ph<10> _10; #else -constexpr __ph<1> _1{}; -constexpr __ph<2> _2{}; -constexpr __ph<3> _3{}; -constexpr __ph<4> _4{}; -constexpr __ph<5> _5{}; -constexpr __ph<6> _6{}; -constexpr __ph<7> _7{}; -constexpr __ph<8> _8{}; -constexpr __ph<9> _9{}; -constexpr __ph<10> _10{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<1> _1{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<2> _2{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<3> _3{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<4> _4{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<5> _5{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<6> _6{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<7> _7{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<8> _8{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<9> _9{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<10> _10{}; #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_BIND) } // placeholders diff --git a/include/memory b/include/memory index df221ffa7510..d6b427b941b5 100644 --- a/include/memory +++ b/include/memory @@ -18,7 +18,7 @@ namespace std { struct allocator_arg_t { }; -constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template struct uses_allocator; @@ -631,6 +631,9 @@ template struct hash; template struct hash >; template struct hash >; +template + inline constexpr bool uses_allocator_v = uses_allocator::value; + // Pointer safety enum class pointer_safety { relaxed, preferred, strict }; void declare_reachable(void *p); diff --git a/include/mutex b/include/mutex index fbcc0989fa98..52e39b0fb1f8 100644 --- a/include/mutex +++ b/include/mutex @@ -91,9 +91,9 @@ struct defer_lock_t {}; struct try_to_lock_t {}; struct adopt_lock_t {}; -constexpr defer_lock_t defer_lock{}; -constexpr try_to_lock_t try_to_lock{}; -constexpr adopt_lock_t adopt_lock{}; +inline constexpr defer_lock_t defer_lock{}; +inline constexpr try_to_lock_t try_to_lock{}; +inline constexpr adopt_lock_t adopt_lock{}; template class lock_guard diff --git a/include/optional b/include/optional index 35a4d74c2e86..88fd6b5aba2d 100644 --- a/include/optional +++ b/include/optional @@ -22,7 +22,7 @@ namespace std { // 23.6.4, no-value state indicator struct nullopt_t{see below }; - constexpr nullopt_t nullopt(unspecified ); + inline constexpr nullopt_t nullopt(unspecified ); // 23.6.5, class bad_optional_access class bad_optional_access; @@ -195,7 +195,7 @@ struct nullopt_t _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {} }; -/* inline */ constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; +_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; template ::value> struct __optional_destruct_base; diff --git a/include/ratio b/include/ratio index 27aa0ded32e6..7ee5ec245174 100644 --- a/include/ratio +++ b/include/ratio @@ -63,17 +63,17 @@ typedef ratio< 1000000000000000000000, 1> zetta; // not supported typedef ratio<1000000000000000000000000, 1> yotta; // not supported // 20.11.5, ratio comparison - template constexpr bool ratio_equal_v + template inline constexpr bool ratio_equal_v = ratio_equal::value; // C++17 - template constexpr bool ratio_not_equal_v + template inline constexpr bool ratio_not_equal_v = ratio_not_equal::value; // C++17 - template constexpr bool ratio_less_v + template inline constexpr bool ratio_less_v = ratio_less::value; // C++17 - template constexpr bool ratio_less_equal_v + template inline constexpr bool ratio_less_equal_v = ratio_less_equal::value; // C++17 - template constexpr bool ratio_greater_v + template inline constexpr bool ratio_greater_v = ratio_greater::value; // C++17 - template constexpr bool ratio_greater_equal_v + template inline constexpr bool ratio_greater_equal_v = ratio_greater_equal::value; // C++17 } */ @@ -501,22 +501,28 @@ struct __ratio_gcd }; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool ratio_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_equal_v = ratio_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_not_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_less_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_v = ratio_less<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_less_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_greater_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_v = ratio_greater<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_greater_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; #endif diff --git a/include/system_error b/include/system_error index 12745525f57f..c577edceee82 100644 --- a/include/system_error +++ b/include/system_error @@ -47,10 +47,10 @@ template struct is_error_condition_enum : public false_type {}; template -constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17 +inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17 template -constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17 +inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17 class error_code { @@ -246,7 +246,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_code_enum #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; #endif // is_error_condition_enum @@ -257,7 +257,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; #endif // Some error codes are not present on all platforms, so we provide equivalents diff --git a/include/tuple b/include/tuple index 5e32b6dfe2ac..31578d1557a9 100644 --- a/include/tuple +++ b/include/tuple @@ -70,7 +70,7 @@ public: void swap(tuple&) noexcept(AND(swap(declval(), declval())...)); }; -const unspecified ignore; +inline constexpr unspecified ignore; template tuple make_tuple(T&&...); // constexpr in C++14 template tuple forward_as_tuple(T&&...) noexcept; // constexpr in C++14 @@ -87,7 +87,7 @@ template template class tuple_size; // undefined template class tuple_size>; template - constexpr size_t tuple_size_v = tuple_size::value; // C++17 + inline constexpr size_t tuple_size_v = tuple_size::value; // C++17 template class tuple_element; // undefined template class tuple_element>; template @@ -1079,7 +1079,7 @@ struct __ignore_t }; namespace { - constexpr __ignore_t ignore = __ignore_t(); + _LIBCPP_INLINE_VAR constexpr __ignore_t ignore = __ignore_t(); } template @@ -1368,7 +1368,7 @@ pair<_T1, _T2>::pair(piecewise_construct_t, #if _LIBCPP_STD_VER > 14 template -constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; #define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; } diff --git a/include/type_traits b/include/type_traits index 60b5dec5b839..7a6c992930e4 100644 --- a/include/type_traits +++ b/include/type_traits @@ -132,6 +132,8 @@ namespace std template struct has_virtual_destructor; + template struct has_unique_object_representations; // C++17 + // Relationships between types: template struct is_same; template struct is_base_of; @@ -223,173 +225,175 @@ namespace std using void_t = void; // C++17 // See C++14 20.10.4.1, primary type categories - template constexpr bool is_void_v + template inline constexpr bool is_void_v = is_void::value; // C++17 - template constexpr bool is_null_pointer_v + template inline constexpr bool is_null_pointer_v = is_null_pointer::value; // C++17 - template constexpr bool is_integral_v + template inline constexpr bool is_integral_v = is_integral::value; // C++17 - template constexpr bool is_floating_point_v + template inline constexpr bool is_floating_point_v = is_floating_point::value; // C++17 - template constexpr bool is_array_v + template inline constexpr bool is_array_v = is_array::value; // C++17 - template constexpr bool is_pointer_v + template inline constexpr bool is_pointer_v = is_pointer::value; // C++17 - template constexpr bool is_lvalue_reference_v + template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference::value; // C++17 - template constexpr bool is_rvalue_reference_v + template inline constexpr bool is_rvalue_reference_v = is_rvalue_reference::value; // C++17 - template constexpr bool is_member_object_pointer_v + template inline constexpr bool is_member_object_pointer_v = is_member_object_pointer::value; // C++17 - template constexpr bool is_member_function_pointer_v + template inline constexpr bool is_member_function_pointer_v = is_member_function_pointer::value; // C++17 - template constexpr bool is_enum_v + template inline constexpr bool is_enum_v = is_enum::value; // C++17 - template constexpr bool is_union_v + template inline constexpr bool is_union_v = is_union::value; // C++17 - template constexpr bool is_class_v + template inline constexpr bool is_class_v = is_class::value; // C++17 - template constexpr bool is_function_v + template inline constexpr bool is_function_v = is_function::value; // C++17 // See C++14 20.10.4.2, composite type categories - template constexpr bool is_reference_v + template inline constexpr bool is_reference_v = is_reference::value; // C++17 - template constexpr bool is_arithmetic_v + template inline constexpr bool is_arithmetic_v = is_arithmetic::value; // C++17 - template constexpr bool is_fundamental_v + template inline constexpr bool is_fundamental_v = is_fundamental::value; // C++17 - template constexpr bool is_object_v + template inline constexpr bool is_object_v = is_object::value; // C++17 - template constexpr bool is_scalar_v + template inline constexpr bool is_scalar_v = is_scalar::value; // C++17 - template constexpr bool is_compound_v + template inline constexpr bool is_compound_v = is_compound::value; // C++17 - template constexpr bool is_member_pointer_v + template inline constexpr bool is_member_pointer_v = is_member_pointer::value; // C++17 // See C++14 20.10.4.3, type properties - template constexpr bool is_const_v + template inline constexpr bool is_const_v = is_const::value; // C++17 - template constexpr bool is_volatile_v + template inline constexpr bool is_volatile_v = is_volatile::value; // C++17 - template constexpr bool is_trivial_v + template inline constexpr bool is_trivial_v = is_trivial::value; // C++17 - template constexpr bool is_trivially_copyable_v + template inline constexpr bool is_trivially_copyable_v = is_trivially_copyable::value; // C++17 - template constexpr bool is_standard_layout_v + template inline constexpr bool is_standard_layout_v = is_standard_layout::value; // C++17 - template constexpr bool is_pod_v + template inline constexpr bool is_pod_v = is_pod::value; // C++17 - template constexpr bool is_literal_type_v + template inline constexpr bool is_literal_type_v = is_literal_type::value; // C++17 - template constexpr bool is_empty_v + template inline constexpr bool is_empty_v = is_empty::value; // C++17 - template constexpr bool is_polymorphic_v + template inline constexpr bool is_polymorphic_v = is_polymorphic::value; // C++17 - template constexpr bool is_abstract_v + template inline constexpr bool is_abstract_v = is_abstract::value; // C++17 - template constexpr bool is_final_v + template inline constexpr bool is_final_v = is_final::value; // C++17 - template constexpr bool is_aggregate_v + template inline constexpr bool is_aggregate_v = is_aggregate::value; // C++17 - template constexpr bool is_signed_v + template inline constexpr bool is_signed_v = is_signed::value; // C++17 - template constexpr bool is_unsigned_v + template inline constexpr bool is_unsigned_v = is_unsigned::value; // C++17 - template constexpr bool is_constructible_v + template inline constexpr bool is_constructible_v = is_constructible::value; // C++17 - template constexpr bool is_default_constructible_v + template inline constexpr bool is_default_constructible_v = is_default_constructible::value; // C++17 - template constexpr bool is_copy_constructible_v + template inline constexpr bool is_copy_constructible_v = is_copy_constructible::value; // C++17 - template constexpr bool is_move_constructible_v + template inline constexpr bool is_move_constructible_v = is_move_constructible::value; // C++17 - template constexpr bool is_assignable_v + template inline constexpr bool is_assignable_v = is_assignable::value; // C++17 - template constexpr bool is_copy_assignable_v + template inline constexpr bool is_copy_assignable_v = is_copy_assignable::value; // C++17 - template constexpr bool is_move_assignable_v + template inline constexpr bool is_move_assignable_v = is_move_assignable::value; // C++17 - template constexpr bool is_swappable_with_v + template inline constexpr bool is_swappable_with_v = is_swappable_with::value; // C++17 - template constexpr bool is_swappable_v + template inline constexpr bool is_swappable_v = is_swappable::value; // C++17 - template constexpr bool is_destructible_v + template inline constexpr bool is_destructible_v = is_destructible::value; // C++17 - template constexpr bool is_trivially_constructible_v + template inline constexpr bool is_trivially_constructible_v = is_trivially_constructible::value; // C++17 - template constexpr bool is_trivially_default_constructible_v + template inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible::value; // C++17 - template constexpr bool is_trivially_copy_constructible_v + template inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible::value; // C++17 - template constexpr bool is_trivially_move_constructible_v + template inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible::value; // C++17 - template constexpr bool is_trivially_assignable_v + template inline constexpr bool is_trivially_assignable_v = is_trivially_assignable::value; // C++17 - template constexpr bool is_trivially_copy_assignable_v + template inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable::value; // C++17 - template constexpr bool is_trivially_move_assignable_v + template inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable::value; // C++17 - template constexpr bool is_trivially_destructible_v + template inline constexpr bool is_trivially_destructible_v = is_trivially_destructible::value; // C++17 - template constexpr bool is_nothrow_constructible_v + template inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible::value; // C++17 - template constexpr bool is_nothrow_default_constructible_v + template inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible::value; // C++17 - template constexpr bool is_nothrow_copy_constructible_v + template inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible::value; // C++17 - template constexpr bool is_nothrow_move_constructible_v + template inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible::value; // C++17 - template constexpr bool is_nothrow_assignable_v + template inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable::value; // C++17 - template constexpr bool is_nothrow_copy_assignable_v + template inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable::value; // C++17 - template constexpr bool is_nothrow_move_assignable_v + template inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable::value; // C++17 - template constexpr bool is_nothrow_swappable_with_v + template inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with::value; // C++17 - template constexpr bool is_nothrow_swappable_v + template inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable::value; // C++17 - template constexpr bool is_nothrow_destructible_v + template inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible::value; // C++17 - template constexpr bool has_virtual_destructor_v + template inline constexpr bool has_virtual_destructor_v = has_virtual_destructor::value; // C++17 + template inline constexpr bool has_unique_object_representations_v // C++17 + = has_unique_object_representations::value; // See C++14 20.10.5, type property queries - template constexpr size_t alignment_of_v + template inline constexpr size_t alignment_of_v = alignment_of::value; // C++17 - template constexpr size_t rank_v + template inline constexpr size_t rank_v = rank::value; // C++17 - template constexpr size_t extent_v + template inline constexpr size_t extent_v = extent::value; // C++17 // See C++14 20.10.6, type relations - template constexpr bool is_same_v + template inline constexpr bool is_same_v = is_same::value; // C++17 - template constexpr bool is_base_of_v + template inline constexpr bool is_base_of_v = is_base_of::value; // C++17 - template constexpr bool is_convertible_v + template inline constexpr bool is_convertible_v = is_convertible::value; // C++17 - template constexpr bool is_invocable_v + template inline constexpr bool is_invocable_v = is_invocable::value; // C++17 - template constexpr bool is_invocable_r_v + template inline constexpr bool is_invocable_r_v = is_invocable_r::value; // C++17 - template constexpr bool is_nothrow_invocable_v + template inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable::value; // C++17 - template constexpr bool is_nothrow_invocable_r_v + template inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r::value; // C++17 // [meta.logical], logical operator traits: template struct conjunction; // C++17 template - constexpr bool conjunction_v = conjunction::value; // C++17 + inline constexpr bool conjunction_v = conjunction::value; // C++17 template struct disjunction; // C++17 template - constexpr bool disjunction_v = disjunction::value; // C++17 + inline constexpr bool disjunction_v = disjunction::value; // C++17 template struct negation; // C++17 template - constexpr bool negation_v = negation::value; // C++17 + inline constexpr bool negation_v = negation::value; // C++17 } @@ -619,7 +623,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_const : public fa template struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_const_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_const_v = is_const<_Tp>::value; #endif @@ -629,7 +634,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_volatile : pub template struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_volatile_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_volatile_v = is_volatile<_Tp>::value; #endif @@ -666,7 +672,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_void : public __libcpp_is_void::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_void_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_void_v = is_void<_Tp>::value; #endif @@ -683,7 +690,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_null_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_null_pointer_v = is_null_pointer<_Tp>::value; #endif #endif @@ -717,7 +725,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_integral : public __libcpp_is_integral::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_integral_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v = is_integral<_Tp>::value; #endif @@ -732,7 +741,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_floating_point : public __libcpp_is_floating_point::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_floating_point_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_floating_point_v = is_floating_point<_Tp>::value; #endif @@ -746,7 +756,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_array_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v = is_array<_Tp>::value; #endif @@ -759,7 +770,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_pointer : public __libcpp_is_pointer::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pointer_v = is_pointer<_Tp>::value; #endif @@ -780,13 +792,16 @@ template struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public tr #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v = is_reference<_Tp>::value; -template _LIBCPP_CONSTEXPR bool is_lvalue_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; -template _LIBCPP_CONSTEXPR bool is_rvalue_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; #endif // is_union @@ -805,7 +820,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_union #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_union_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_union_v = is_union<_Tp>::value; #endif @@ -830,7 +846,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_class #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_class_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_class_v = is_class<_Tp>::value; #endif @@ -840,7 +857,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_same : template struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_same_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_same_v = is_same<_Tp, _Up>::value; #endif @@ -870,7 +888,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_function : public __libcpp_is_function<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_function_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_function_v = is_function<_Tp>::value; #endif @@ -897,7 +916,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer : public __libcpp_is_member_function_pointer::type>::type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_function_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; #endif @@ -910,7 +930,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_member_pointer : public __libcpp_is_member_pointer::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_pointer_v = is_member_pointer<_Tp>::value; #endif @@ -921,7 +942,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer !is_member_function_pointer<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_object_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; #endif @@ -949,7 +971,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_enum #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_enum_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_enum_v = is_enum<_Tp>::value; #endif @@ -960,7 +983,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_arithmetic is_floating_point<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_arithmetic_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_arithmetic_v = is_arithmetic<_Tp>::value; #endif @@ -972,7 +996,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_fundamental is_arithmetic<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_fundamental_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_fundamental_v = is_fundamental<_Tp>::value; #endif @@ -988,7 +1013,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_scalar template <> struct _LIBCPP_TEMPLATE_VIS is_scalar : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_scalar_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scalar_v = is_scalar<_Tp>::value; #endif @@ -1001,7 +1027,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_object is_class<_Tp>::value > {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_object_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_object_v = is_object<_Tp>::value; #endif @@ -1011,7 +1038,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_compound : public integral_constant::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_compound_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_compound_v = is_compound<_Tp>::value; #endif @@ -1210,7 +1238,8 @@ template struct __libcpp_is_signed<_Tp, false> : public false_type { template struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_signed_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_signed_v = is_signed<_Tp>::value; #endif @@ -1230,7 +1259,8 @@ template struct __libcpp_is_unsigned<_Tp, false> : public false_type template struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_unsigned_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v = is_unsigned<_Tp>::value; #endif @@ -1244,7 +1274,8 @@ template struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]> : public integral_constant::value + 1> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR size_t rank_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t rank_v = rank<_Tp>::value; #endif @@ -1262,7 +1293,8 @@ template struct _LIBCPP_TEMPLATE_VIS exten : public integral_constant::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR size_t extent_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t extent_v = extent<_Tp, _Ip>::value; #endif @@ -1334,7 +1366,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_abstract : public integral_constant {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_abstract_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_abstract_v = is_abstract<_Tp>::value; #endif @@ -1354,7 +1387,8 @@ is_final : public integral_constant {}; #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_final_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_final_v = is_final<_Tp>::value; #endif @@ -1366,7 +1400,8 @@ is_aggregate : public integral_constant {}; #if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr bool is_aggregate_v + = is_aggregate<_Tp>::value; #endif #endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE) @@ -1407,7 +1442,8 @@ struct _LIBCPP_TEMPLATE_VIS is_base_of #endif // _LIBCPP_HAS_IS_BASE_OF #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_base_of_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_base_of_v = is_base_of<_Bp, _Dp>::value; #endif @@ -1497,7 +1533,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_convertible #endif // __has_feature(is_convertible_to) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_convertible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_convertible_v = is_convertible<_From, _To>::value; #endif @@ -1533,7 +1570,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_empty : public __libcpp_empt #endif // __has_feature(is_empty) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_empty_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_empty_v = is_empty<_Tp>::value; #endif @@ -1558,7 +1596,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_polymorphic #endif // __has_feature(is_polymorphic) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_polymorphic_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_polymorphic_v = is_polymorphic<_Tp>::value; #endif @@ -1577,17 +1616,35 @@ template struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool has_virtual_destructor_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; #endif +// has_unique_object_representations + +#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS) + +template struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations + : public integral_constant>)> {}; + +#if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_unique_object_representations_v + = has_unique_object_representations<_Tp>::value; +#endif + +#endif + // alignment_of template struct _LIBCPP_TEMPLATE_VIS alignment_of : public integral_constant {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR size_t alignment_of_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t alignment_of_v = alignment_of<_Tp>::value; #endif @@ -2126,7 +2183,8 @@ struct is_assignable : public __is_assignable_imp<_Tp, _Arg> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_assignable_v = is_assignable<_Tp, _Arg>::value; #endif @@ -2137,7 +2195,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_copy_assignable typename add_lvalue_reference::type>::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_copy_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; #endif @@ -2152,7 +2211,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_move_assignable #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_move_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_assignable_v = is_move_assignable<_Tp>::value; #endif @@ -2215,7 +2275,8 @@ struct is_destructible : public _VSTD::false_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_destructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_destructible_v = is_destructible<_Tp>::value; #endif @@ -3260,7 +3321,8 @@ struct __is_constructible2_imp #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) -template _LIBCPP_CONSTEXPR bool is_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_constructible_v = is_constructible<_Tp, _Args...>::value; #endif @@ -3272,7 +3334,8 @@ struct _LIBCPP_TEMPLATE_VIS is_default_constructible {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_default_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_default_constructible_v = is_default_constructible<_Tp>::value; #endif @@ -3284,7 +3347,8 @@ struct _LIBCPP_TEMPLATE_VIS is_copy_constructible typename add_lvalue_reference::type>::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_copy_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; #endif @@ -3300,7 +3364,8 @@ struct _LIBCPP_TEMPLATE_VIS is_move_constructible {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_move_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_move_constructible_v = is_move_constructible<_Tp>::value; #endif @@ -3432,7 +3497,8 @@ struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible<_Tp, _Tp&, #endif // _LIBCPP_HAS_NO_VARIADICS #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) -template _LIBCPP_CONSTEXPR bool is_trivially_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; #endif @@ -3443,7 +3509,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructi {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; #endif @@ -3454,7 +3521,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; #endif @@ -3469,7 +3537,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; #endif @@ -3512,7 +3581,8 @@ struct is_trivially_assignable<_Tp&, _Tp&&> #endif // !__has_feature(is_trivially_assignable) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value; #endif @@ -3523,7 +3593,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable typename add_lvalue_reference::type>::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; #endif @@ -3539,7 +3610,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; #endif @@ -3565,7 +3637,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[] #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_destructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; #endif @@ -3730,7 +3803,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp, _Tp&, #endif // __has_feature(is_nothrow_constructible) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) -template _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; #endif @@ -3741,7 +3815,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructibl {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value; #endif @@ -3752,7 +3827,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible typename add_lvalue_reference::type>::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; #endif @@ -3767,7 +3843,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; #endif @@ -3840,7 +3917,8 @@ struct is_nothrow_assignable<_Tp&, _Tp&&> #endif // __has_feature(cxx_noexcept) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value; #endif @@ -3851,7 +3929,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable typename add_lvalue_reference::type>::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; #endif @@ -3867,7 +3946,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; #endif @@ -3933,7 +4013,8 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]> #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; #endif @@ -3955,7 +4036,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_pod #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_pod_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pod_v = is_pod<_Tp>::value; #endif @@ -3971,7 +4053,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_literal_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_literal_type_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_literal_type_v = is_literal_type<_Tp>::value; #endif @@ -3986,7 +4069,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_standard_layout {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_standard_layout_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_standard_layout_v = is_standard_layout<_Tp>::value; #endif @@ -4003,7 +4087,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivially_copyable_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; #endif @@ -4019,7 +4104,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_trivial {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_trivial_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_trivial_v = is_trivial<_Tp>::value; #endif @@ -4457,12 +4543,14 @@ struct _LIBCPP_TEMPLATE_VIS is_invocable_r : integral_constant::value> {}; template -constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; +_LIBCPP_INLINE_VAR constexpr bool is_invocable_v + = is_invocable<_Fn, _Args...>::value; template -constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; +_LIBCPP_INLINE_VAR constexpr bool is_invocable_r_v + = is_invocable_r<_Ret, _Fn, _Args...>::value; -// is_nothrow_callable +// is_nothrow_invocable template struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable @@ -4473,10 +4561,12 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r : integral_constant::value> {}; template -constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; +_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_v + = is_nothrow_invocable<_Fn, _Args...>::value; template -constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; +_LIBCPP_INLINE_VAR constexpr bool is_nothrow_invocable_r_v + = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; #endif // _LIBCPP_STD_VER > 14 @@ -4616,16 +4706,20 @@ struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable }; template -constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; +_LIBCPP_INLINE_VAR constexpr bool is_swappable_with_v + = is_swappable_with<_Tp, _Up>::value; template -constexpr bool is_swappable_v = is_swappable<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr bool is_swappable_v + = is_swappable<_Tp>::value; template -constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; +_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_with_v + = is_nothrow_swappable_with<_Tp, _Up>::value; template -constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr bool is_nothrow_swappable_v + = is_nothrow_swappable<_Tp>::value; #endif // _LIBCPP_STD_VER > 14 @@ -4742,15 +4836,21 @@ template using void_t = void; # ifndef _LIBCPP_HAS_NO_VARIADICS template struct conjunction : __and_<_Args...> {}; -template constexpr bool conjunction_v = conjunction<_Args...>::value; +template +_LIBCPP_INLINE_VAR constexpr bool conjunction_v + = conjunction<_Args...>::value; template struct disjunction : __or_<_Args...> {}; -template constexpr bool disjunction_v = disjunction<_Args...>::value; +template +_LIBCPP_INLINE_VAR constexpr bool disjunction_v + = disjunction<_Args...>::value; template struct negation : __not_<_Tp> {}; -template constexpr bool negation_v = negation<_Tp>::value; +template +_LIBCPP_INLINE_VAR constexpr bool negation_v + = negation<_Tp>::value; # endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_STD_VER > 14 diff --git a/include/utility b/include/utility index 288c6e823c3b..6fa2e15d1448 100644 --- a/include/utility +++ b/include/utility @@ -99,7 +99,7 @@ void swap(pair& x, pair& y) noexcept(noexcept(x.swap(y))); struct piecewise_construct_t { }; -constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); +inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template class tuple_size; template class tuple_element; @@ -296,7 +296,7 @@ struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_UTILITY) extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t(); #else -constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); +/* _LIBCPP_INLINE_VAR */ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); #endif #if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR) @@ -904,30 +904,21 @@ _T1 exchange(_T1& __obj, _T2 && __new_value) struct _LIBCPP_TYPE_VIS in_place_t { explicit in_place_t() = default; }; -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_t in_place{}; +_LIBCPP_INLINE_VAR constexpr in_place_t in_place{}; template struct _LIBCPP_TEMPLATE_VIS in_place_type_t { explicit in_place_type_t() = default; }; template -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_type_t<_Tp> in_place_type{}; +_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{}; template struct _LIBCPP_TYPE_VIS in_place_index_t { explicit in_place_index_t() = default; }; template -#ifndef _LIBCPP_HAS_NO_INLINE_VARIABLES -inline -#endif -constexpr in_place_index_t<_Idx> in_place_index{}; +_LIBCPP_INLINE_VAR constexpr in_place_index_t<_Idx> in_place_index{}; template struct __is_inplace_type_imp : false_type {}; template struct __is_inplace_type_imp> : true_type {}; diff --git a/include/variant b/include/variant index 8a66add865ae..987b8a7982df 100644 --- a/include/variant +++ b/include/variant @@ -76,7 +76,7 @@ namespace std { template struct variant_size; // undefined template - constexpr size_t variant_size_v = variant_size::value; + inline constexpr size_t variant_size_v = variant_size::value; template struct variant_size; template struct variant_size; @@ -97,7 +97,7 @@ namespace std { template struct variant_alternative>; - constexpr size_t variant_npos = -1; + inline constexpr size_t variant_npos = -1; // 20.7.4, value access template @@ -246,7 +246,7 @@ template struct _LIBCPP_TEMPLATE_VIS variant_size; template -constexpr size_t variant_size_v = variant_size<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t variant_size_v = variant_size<_Tp>::value; template struct _LIBCPP_TEMPLATE_VIS variant_size : variant_size<_Tp> {}; @@ -286,7 +286,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> { using type = __type_pack_element<_Ip, _Types...>; }; -constexpr size_t variant_npos = static_cast(-1); +_LIBCPP_INLINE_VAR constexpr size_t variant_npos = static_cast(-1); constexpr int __choose_index_type(unsigned int __num_elem) { if (__num_elem < std::numeric_limits::max()) diff --git a/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp b/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp index 517eb62ccae2..c8966f6fc8dc 100644 --- a/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp +++ b/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp @@ -13,10 +13,29 @@ #include #include +#include // for is_permutation #include #include "min_allocator.h" + +#ifndef TEST_HAS_NO_EXCEPTIONS +template +struct throwingLess { + throwingLess() : num_(1) {} + throwingLess(int num) : num_(num) {} + + bool operator() (const T& lhs, const T& rhs) const + { + if ( --num_ == 0) throw 1; + return lhs < rhs; + } + + mutable int num_; + }; +#endif + + int main() { { @@ -26,6 +45,28 @@ int main() c1.sort(std::greater()); assert(c1 == std::list(a2, a2+sizeof(a2)/sizeof(a2[0]))); } + +// Test with throwing comparison; make sure that nothing is lost. +// This is (sort of) LWG #2824 +#ifndef TEST_HAS_NO_EXCEPTIONS + { + int a1[] = {4, 8, 1, 0, 5, 7, 2, 3, 6, 11, 10, 9}; + const int sz = sizeof(a1)/sizeof(a1[0]); + for (int i = 0; i < 10; ++i) + { + std::list c1(a1, a1 + sz); + try + { + throwingLess comp(i); + c1.sort(std::cref(comp)); + } + catch (int) {} + assert((c1.size() == sz)); + assert((std::is_permutation(c1.begin(), c1.end(), a1))); + } + } +#endif + #if TEST_STD_VER >= 11 { int a1[] = {4, 8, 1, 0, 5, 7, 2, 3, 6, 11, 10, 9}; diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp new file mode 100644 index 000000000000..e4a3d203ce7f --- /dev/null +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp @@ -0,0 +1,104 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 +// UNSUPPORTED: clang-3, clang-4, clang-5, apple-clang, gcc-4, gcc-5, gcc-6 + +// type_traits + +// has_unique_object_representations + +#include + +#include "test_macros.h" + +template +void test_has_unique_object_representations() +{ + static_assert( std::has_unique_object_representations::value, ""); + static_assert( std::has_unique_object_representations::value, ""); + static_assert( std::has_unique_object_representations::value, ""); + static_assert( std::has_unique_object_representations::value, ""); + + static_assert( std::has_unique_object_representations_v, ""); + static_assert( std::has_unique_object_representations_v, ""); + static_assert( std::has_unique_object_representations_v, ""); + static_assert( std::has_unique_object_representations_v, ""); +} + +template +void test_has_not_has_unique_object_representations() +{ + static_assert(!std::has_unique_object_representations::value, ""); + static_assert(!std::has_unique_object_representations::value, ""); + static_assert(!std::has_unique_object_representations::value, ""); + static_assert(!std::has_unique_object_representations::value, ""); + + static_assert(!std::has_unique_object_representations_v, ""); + static_assert(!std::has_unique_object_representations_v, ""); + static_assert(!std::has_unique_object_representations_v, ""); + static_assert(!std::has_unique_object_representations_v, ""); +} + +class Empty +{ +}; + +class NotEmpty +{ + virtual ~NotEmpty(); +}; + +union Union {}; + +struct bit_zero +{ + int : 0; +}; + +class Abstract +{ + virtual ~Abstract() = 0; +}; + +struct A +{ + ~A(); + unsigned foo; +}; + +struct B +{ + char bar; + int foo; +}; + + +int main() +{ + test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); + test_has_not_has_unique_object_representations(); + +// I would expect all three of these to have unique representations. +// I would also expect that there are systems where they do not. +// test_has_not_has_unique_object_representations(); +// test_has_not_has_unique_object_representations(); +// test_has_not_has_unique_object_representations(); + + + test_has_unique_object_representations(); + test_has_unique_object_representations(); + test_has_unique_object_representations(); + test_has_unique_object_representations(); + +} diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html index 4665eb22bd3c..82f7fa51926e 100644 --- a/www/cxx1z_status.html +++ b/www/cxx1z_status.html @@ -113,7 +113,7 @@ p0209r2LWGmake_from_tuple: apply for constructionOuluComplete3.9 p0219r1LWGRelative Paths for FilesystemOulu p0254r2LWGIntegrating std::string_view and std::stringOuluComplete4.0 - p0258r2LWGhas_unique_object_representationsOulu + p0258r2LWGhas_unique_object_representationsOuluComplete6.0 p0295r0LWGAdopt Selected Library Fundamentals V2 Components for C++17OuluComplete4.0 p0302r1LWGRemoving Allocator Support in std::functionOuluComplete4.0 p0307r2LWGMaking Optional Greater Equal AgainOuluComplete4.0 @@ -161,7 +161,7 @@ P0574R1LWGAlgorithm Complexity Constraints and Parallel OverloadsKona P0599R1LWGnoexcept for hash functionsKonaComplete5.0 P0604R0LWGResolving GB 55, US 84, US 85, US 86Kona - P0607R0LWGInline Variables for the Standard LibraryKona + P0607R0LWGInline Variables for the Standard LibraryKonaIn Progress6.0 P0618R0LWGDeprecating <codecvt>Kona P0623R0LWGFinal C++17 Parallel Algorithms FixesKona @@ -171,6 +171,8 @@ +

The parts of P0607 that are not done are the <regex> bits.

+

[ Note: "Nothing to do" means that no library changes were needed to implement this change -- end note]

Library Working group Issues Status

@@ -452,7 +454,7 @@ 2788basic_string range mutators unintentionally require a default constructible allocatorKonaComplete 2789Equivalence of contained objectsKonaComplete 2790Missing specification of istreambuf_iterator::operator->KonaComplete - 2794Missing requirements for allocator pointersKona + 2794Missing requirements for allocator pointersKonaNothing to do 2795§[global.functions] provides incorrect example of ADL useKonaComplete 2796tuple should be a literal typeKonaComplete 2801Default-constructibility of unique_ptrKonaComplete @@ -461,7 +463,7 @@ 2806Base class of bad_optional_accessKonaComplete 2807std::invoke should use std::is_nothrow_callableKona 2812Range access is available with <string_view>KonaComplete - 2824list::sort should say that the order of elements is unspecified if an exception is thrownKona + 2824list::sort should say that the order of elements is unspecified if an exception is thrownKonaComplete 2826string_view iterators use old wordingKonaComplete 2834Resolution LWG 2223 is missing wording about end iteratorsKonaComplete 2835LWG 2536 seems to misspecify <tgmath.h>Kona @@ -473,7 +475,7 @@ 2855std::throw_with_nested("string_literal")KonaComplete 2857{variant,optional,any}::emplace should return the constructed valueKonaComplete 2861basic_string should require that charT match traits::char_typeKonaComplete - 2866Incorrect derived classes constraintsKona + 2866Incorrect derived classes constraintsKonaNothing to do 2868Missing specification of bad_any_cast::what()KonaComplete 2872Add definition for direct-non-list-initializationKonaComplete 2873Add noexcept to several shared_ptr related functionsKonaComplete @@ -501,7 +503,7 @@ -

Last Updated: 27-Jul-2017

+

Last Updated: 2-Jan-2018