Commit 46942c81 by Jonathan Wakely Committed by Jonathan Wakely

Define std::allocator<T>::is_always_equal

	* include/bits/allocator.h (allocator<T>::is_always_equal): Define.
	* testsuite/20_util/allocator/requirements/typedefs.cc: Test for
	is_always_equal.
	* testsuite/util/testsuite_allocator.h
	(uneq_allocator::is_always_equal): Define as false_type.

From-SVN: r240920
parent f2e79496
2016-10-10 Jonathan Wakely <jwakely@redhat.com> 2016-10-10 Jonathan Wakely <jwakely@redhat.com>
* include/bits/allocator.h (allocator<T>::is_always_equal): Define.
* testsuite/20_util/allocator/requirements/typedefs.cc: Test for
is_always_equal.
* testsuite/util/testsuite_allocator.h
(uneq_allocator::is_always_equal): Define as false_type.
* include/experimental/numeric (gcd, lcm): Make bool arguments * include/experimental/numeric (gcd, lcm): Make bool arguments
ill-formed. ill-formed.
* include/std/numeric (gcd, lcm): Likewise. * include/std/numeric (gcd, lcm): Likewise.
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
#endif #endif
#define __cpp_lib_incomplete_container_elements 201505 #define __cpp_lib_incomplete_container_elements 201505
#if __cplusplus >= 201103L
# define __cpp_lib_allocator_is_always_equal 201411
#endif
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
...@@ -80,7 +83,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -80,7 +83,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 2103. std::allocator propagate_on_container_move_assignment // 2103. std::allocator propagate_on_container_move_assignment
typedef true_type propagate_on_container_move_assignment; typedef true_type propagate_on_container_move_assignment;
#define __cpp_lib_allocator_is_always_equal 201411
typedef true_type is_always_equal; typedef true_type is_always_equal;
#endif #endif
}; };
...@@ -113,6 +115,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -113,6 +115,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2103. std::allocator propagate_on_container_move_assignment // 2103. std::allocator propagate_on_container_move_assignment
typedef true_type propagate_on_container_move_assignment; typedef true_type propagate_on_container_move_assignment;
typedef true_type is_always_equal;
#endif #endif
allocator() throw() { } allocator() throw() { }
......
...@@ -48,3 +48,6 @@ static_assert( is_same<allocator<int>::rebind<char>::other, ...@@ -48,3 +48,6 @@ static_assert( is_same<allocator<int>::rebind<char>::other,
static_assert( is_same<allocator<int>::propagate_on_container_move_assignment, static_assert( is_same<allocator<int>::propagate_on_container_move_assignment,
std::true_type>::value, std::true_type>::value,
"propagate_on_container_move_assignment" ); "propagate_on_container_move_assignment" );
static_assert( is_same<allocator<int>::is_always_equal, std::true_type>::value,
"is_always_equal" );
...@@ -297,6 +297,7 @@ namespace __gnu_test ...@@ -297,6 +297,7 @@ namespace __gnu_test
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
typedef std::true_type propagate_on_container_swap; typedef std::true_type propagate_on_container_swap;
typedef std::false_type is_always_equal;
#endif #endif
template<typename Tp1> template<typename Tp1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment