From: Jonathan Wakely Date: Tue, 18 Oct 2016 11:42:18 +0000 (+0100) Subject: Don't define uses-allocator variable templates in C++11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0aeb81f86f6dc5bfc21bf035fd71ab17a3f3978f;p=gcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0339477e277..d371b857475 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,7 +1,13 @@ +2016-10-18 Jonathan Wakely + + * 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 * 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 c7d14f33132..612c53cb119 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 { }; +#if __cplusplus >= 201402L template constexpr bool __is_uses_allocator_constructible_v = __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; +#endif // C++14 template struct __is_nothrow_uses_allocator_constructible @@ -137,9 +139,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { }; +#if __cplusplus >= 201402L template constexpr bool __is_nothrow_uses_allocator_constructible_v = __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; +#endif // C++14 template void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr,