Don't define uses-allocator variable templates in C++11
authorJonathan Wakely <redi@gcc.gnu.org>
Tue, 18 Oct 2016 11:42:18 +0000 (12:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 18 Oct 2016 11:42:18 +0000 (12:42 +0100)
* include/bits/uses_allocator.h (__is_uses_allocator_constructible_v)
(__is_nothrow_uses_allocator_constructible_v): Only define for C++14
and later.

From-SVN: r241301

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/uses_allocator.h

index 0339477e27755ad5765fbcccbf88953bf0ef7322..d371b857475835f94f50e00e265e6faa7e016231 100644 (file)
@@ -1,7 +1,13 @@
+2016-10-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/uses_allocator.h (__is_uses_allocator_constructible_v)
+       (__is_nothrow_uses_allocator_constructible_v): Only define for C++14
+       and later.
+
 2016-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * testsuite/27_io/basic_filebuf/close/12790-1.cc: Remove 'test'
-        variables.
+       variables.
        * testsuite/27_io/basic_filebuf/close/char/1.cc: Likewise.
        * testsuite/27_io/basic_filebuf/close/char/12790-1.cc: Likewise.
        * testsuite/27_io/basic_filebuf/close/char/12790-2.cc: Likewise.
index c7d14f33132768904f356447784bdad43142c2bc..612c53cb1191e58b32dfab3af7bbc4f66ff6502c 100644 (file)
@@ -126,9 +126,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...>
     { };
 
+#if __cplusplus >= 201402L
   template<typename _Tp, typename _Alloc, typename... _Args>
     constexpr bool __is_uses_allocator_constructible_v =
       __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
+#endif // C++14
 
   template<typename _Tp, typename _Alloc, typename... _Args>
     struct __is_nothrow_uses_allocator_constructible
@@ -137,9 +139,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { };
 
 
+#if __cplusplus >= 201402L
   template<typename _Tp, typename _Alloc, typename... _Args>
     constexpr bool __is_nothrow_uses_allocator_constructible_v =
       __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value;
+#endif // C++14
 
   template<typename _Tp, typename... _Args>
     void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr,