Implement P1209 - Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
|
||||
*/
|
||||
@@ -24,6 +25,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <deque> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_incomplete_container_elements 201505L
|
||||
__cpp_lib_list_remove_return_type 201806L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
@@ -26,6 +27,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <forward_list> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_incomplete_container_elements 201505L
|
||||
__cpp_lib_list_remove_return_type 201806L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
@@ -26,6 +27,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <list> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_generic_associative_lookup 201304L
|
||||
__cpp_lib_map_try_emplace 201411L
|
||||
__cpp_lib_node_extract 201606L
|
||||
@@ -27,6 +28,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <map> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_generic_associative_lookup 201304L
|
||||
__cpp_lib_node_extract 201606L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
@@ -26,6 +27,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <set> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_char8_t 201811L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
__cpp_lib_string_udls 201304L
|
||||
@@ -27,6 +28,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <string> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
# if !defined(__cpp_lib_char8_t)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_node_extract 201606L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
__cpp_lib_unordered_map_try_emplace 201411L
|
||||
@@ -26,6 +27,17 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <unordered_map> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_node_extract 201606L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
|
||||
@@ -25,6 +26,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <unordered_set> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
/* Constant Value
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
__cpp_lib_erase_if 201811L
|
||||
__cpp_lib_incomplete_container_elements 201505L
|
||||
__cpp_lib_nonmember_container_access 201411L
|
||||
|
||||
@@ -25,6 +26,16 @@ int main()
|
||||
{
|
||||
// ensure that the macros that are supposed to be defined in <vector> are defined.
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
# if !defined(__cpp_lib_erase_if)
|
||||
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
|
||||
# else
|
||||
# if __cpp_lib_erase_if < 201811L
|
||||
# error "__cpp_lib_erase_if has an invalid value"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined(__cpp_lib_fooby)
|
||||
# error "__cpp_lib_fooby is not defined"
|
||||
|
||||
Reference in New Issue
Block a user