aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <redi@gcc.gnu.org>2016-10-18 12:42:18 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-10-18 12:42:18 +0100
commit0aeb81f86f6dc5bfc21bf035fd71ab17a3f3978f (patch)
tree4b99995fda2a227f17a7008407104b45e7f514e8
parentb64e82394fd4ad74220946bdab73bee9ad63bc0a (diff)
downloadgcc-0aeb81f86f6dc5bfc21bf035fd71ab17a3f3978f.zip
gcc-0aeb81f86f6dc5bfc21bf035fd71ab17a3f3978f.tar.gz
gcc-0aeb81f86f6dc5bfc21bf035fd71ab17a3f3978f.tar.bz2
Don't define uses-allocator variable templates in C++11
* 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
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/bits/uses_allocator.h4
2 files changed, 11 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0339477..d371b85 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index c7d14f3..612c53c 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -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,