]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not declare std::uses_allocator before C++11
authorJonathan Wakely <jwakely@redhat.com>
Thu, 24 Oct 2019 12:54:50 +0000 (13:54 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 24 Oct 2019 12:54:50 +0000 (13:54 +0100)
Backport from mainline
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.

From-SVN: r277387

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/memoryfwd.h
libstdc++-v3/testsuite/17_intro/names.cc

index 00cab77041743df188f1c9cbb3e5e4a0070fa11b..fe6c649aece6cffb48d631a17334fbccfbf13ff9 100644 (file)
@@ -1,5 +1,11 @@
 2019-10-24  Jonathan Wakely  <jwakely@redhat.com>
 
+       Backport from mainline
+       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.
+
        Backport from mainline
        2019-10-18  Jonathan Wakely  <jwakely@redhat.com>
 
index 8b1664a398d55b7fa53d2bce68953d84826f1a40..732ac805322d596ff28fe49572fe45e3d167cf71 100644 (file)
@@ -66,9 +66,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<>
     class allocator<void>;
 
+#if __cplusplus >= 201103L
   /// Declare uses_allocator so it can be specialized in \<queue\> etc.
   template<typename, typename>
     struct uses_allocator;
+#endif
 
   /// @} group memory
 
index 66c639ff3a33e1ff71ee7c892addb470379884ce..a47d53503e3fa07f768dc3fbbc4d38d6b5f69808 100644 (file)
 
 #define tmp (
 
+#if __cplusplus < 201103L
+#define uses_allocator  (
+#endif
+
 #if __cplusplus < 201703L
 // <charconv> defines to_chars_result::ptr and to_chars_result::ec
 #define ec (