libstdc++: Add missing feature-test macro in various headers
version.syn#2 requires various headers to define __cpp_lib_allocator_traits_is_always_equal. Currently, only <memory> was defining this macro. Implement fixes for the other headers as well. Signed-off-by: Dhruv Chawla <dhruvc@nvidia.com> libstdc++-v3/ChangeLog: * include/std/deque: Define macro __glibcxx_want_allocator_traits_is_always_equal. * include/std/forward_list: Likewise. * include/std/list: Likewise. * include/std/map: Likewise. * include/std/scoped_allocator: Likewise. * include/std/set: Likewise. * include/std/string: Likewise. * include/std/unordered_map: Likewise. * include/std/unordered_set: Likewise. * include/std/vector: Likewise. * testsuite/20_util/headers/memory/version.cc: New test. * testsuite/20_util/scoped_allocator/version.cc: Likewise. * testsuite/21_strings/headers/string/version.cc: Likewise. * testsuite/23_containers/deque/version.cc: Likewise. * testsuite/23_containers/forward_list/version.cc: Likewise. * testsuite/23_containers/list/version.cc: Likewise. * testsuite/23_containers/map/version.cc: Likewise. * testsuite/23_containers/set/version.cc: Likewise. * testsuite/23_containers/unordered_map/version.cc: Likewise. * testsuite/23_containers/unordered_set/version.cc: Likewise. * testsuite/23_containers/vector/version.cc: Likewise.
This commit is contained in:
parent
d82edbe92e
commit
efe6efb6f3
21 changed files with 100 additions and 0 deletions
|
@ -68,6 +68,7 @@
|
|||
#include <bits/range_access.h>
|
||||
#include <bits/deque.tcc>
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_nonmember_container_access
|
||||
#include <bits/version.h>
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
# include <debug/forward_list>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_incomplete_container_elements
|
||||
#define __glibcxx_want_list_remove_return_type
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
# include <debug/list>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_incomplete_container_elements
|
||||
#define __glibcxx_want_list_remove_return_type
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
# include <debug/map>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_generic_associative_lookup
|
||||
#define __glibcxx_want_map_try_emplace
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
# include <bits/uses_allocator_args.h>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#include <bits/version.h>
|
||||
|
||||
namespace std _GLIBCXX_VISIBILITY(default)
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
# include <debug/set>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_generic_associative_lookup
|
||||
#define __glibcxx_want_node_extract
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include <bits/basic_string.h>
|
||||
#include <bits/basic_string.tcc>
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_constexpr_char_traits
|
||||
#define __glibcxx_want_constexpr_string
|
||||
#define __glibcxx_want_erase_if
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
# include <debug/unordered_map>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_generic_unordered_lookup
|
||||
#define __glibcxx_want_node_extract
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
# include <debug/unordered_set>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_generic_unordered_lookup
|
||||
#define __glibcxx_want_node_extract
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
# include <debug/vector>
|
||||
#endif
|
||||
|
||||
#define __glibcxx_want_allocator_traits_is_always_equal
|
||||
#define __glibcxx_want_constexpr_vector
|
||||
#define __glibcxx_want_erase_if
|
||||
#define __glibcxx_want_incomplete_container_elements
|
||||
|
|
8
libstdc++-v3/testsuite/20_util/headers/memory/version.cc
Normal file
8
libstdc++-v3/testsuite/20_util/headers/memory/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <memory>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <scoped_allocator>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <string>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
8
libstdc++-v3/testsuite/23_containers/deque/version.cc
Normal file
8
libstdc++-v3/testsuite/23_containers/deque/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <deque>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <forward_list>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
8
libstdc++-v3/testsuite/23_containers/list/version.cc
Normal file
8
libstdc++-v3/testsuite/23_containers/list/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <list>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
8
libstdc++-v3/testsuite/23_containers/map/version.cc
Normal file
8
libstdc++-v3/testsuite/23_containers/map/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <map>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
8
libstdc++-v3/testsuite/23_containers/set/version.cc
Normal file
8
libstdc++-v3/testsuite/23_containers/set/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <set>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
8
libstdc++-v3/testsuite/23_containers/vector/version.cc
Normal file
8
libstdc++-v3/testsuite/23_containers/vector/version.cc
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-do preprocess { target c++17 } }
|
||||
// { dg-add-options no_pch }
|
||||
|
||||
#include <vector>
|
||||
|
||||
#if __cpp_lib_allocator_traits_is_always_equal != 201411L
|
||||
# error "Feature-test macro __cpp_lib_allocator_traits_is_always_equal has wrong value in <version>"
|
||||
#endif
|
Loading…
Add table
Reference in a new issue