Commit 9e1f9bc5 by Jonathan Wakely Committed by Jonathan Wakely

Do not declare std::uses_allocator before C++11

	* include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
	* testsuite/17_intro/names.cc: Check uses_allocator in C++98.

From-SVN: r277301
parent 2cae56bd
2019-10-22 Jonathan Wakely <jwakely@redhat.com> 2019-10-22 Jonathan Wakely <jwakely@redhat.com>
* include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
* testsuite/17_intro/names.cc: Check uses_allocator in C++98.
* include/bits/alloc_traits.h * include/bits/alloc_traits.h
(allocator_traits<allocator<T>>::allocate): Ignore hint for C++20. (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
(allocator_traits<allocator<T>>::construct): Perform placement new (allocator_traits<allocator<T>>::construct): Perform placement new
......
...@@ -68,9 +68,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -68,9 +68,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class allocator<void>; class allocator<void>;
#endif #endif
#if __cplusplus >= 201103L
/// Declare uses_allocator so it can be specialized in \<queue\> etc. /// Declare uses_allocator so it can be specialized in \<queue\> etc.
template<typename, typename> template<typename, typename>
struct uses_allocator; struct uses_allocator;
#endif
/// @} group memory /// @} group memory
......
...@@ -103,6 +103,10 @@ ...@@ -103,6 +103,10 @@
#define tmp ( #define tmp (
#if __cplusplus < 201103L
#define uses_allocator (
#endif
#if __cplusplus < 201703L #if __cplusplus < 201703L
// <charconv> defines to_chars_result::ptr and to_chars_result::ec // <charconv> defines to_chars_result::ptr and to_chars_result::ec
#define ec ( #define ec (
......
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