This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3 PATCH] Implement C++17 variable templates for type traits.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 31 Jul 2016 14:12:47 +0100
- Subject: Re: [v3 PATCH] Implement C++17 variable templates for type traits.
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUY=EOYYVd5fuHQNoWSO76EK=1YkqV-cW86r+AopWAX8vg@mail.gmail.com> <20160729185514.GJ4264@redhat.com> <CAFk2RUaVhgFh33k5kAR0KvReKiK7TVLxn4=e_=-Ceo2bzJBR1g@mail.gmail.com> <20160731114953.GL4264@redhat.com> <CAFk2RUZqUKFNbrY4vXYTpMs9Qq_RYWx9X1LeYqWcuGQEuv=E_Q@mail.gmail.com> <CAFk2RUai1gzyYV53m7ETaQOngvitWZkhieeK5OGJ9iOczwPckw@mail.gmail.com>
On 31/07/16 15:50 +0300, Ville Voutilainen wrote:
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index b1ff58a..8fdeda7 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -108,8 +108,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__ret._M_a = std::__addressof(__a);
return __ret;
}
+#if __cplusplus > 201402L
+ template <typename _Tp, typename _Alloc>
+ constexpr bool uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
+#endif // C++17
-_GLIBCXX_END_NAMESPACE_VERSION
+ _GLIBCXX_END_NAMESPACE_VERSION
This has become indented, but the corresponding BEGIN isn't indented,
so please restore the indentation.
diff --git a/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc b/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc
new file mode 100644
index 0000000..ef66883
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/bind/is_placeholder_v.cc
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++17" }
+// { dg-do compile }
+
+// Copyright (C) 2014-2016 Free Software Foundation, Inc.
This should be just 2016.
Assuming testing passes, OK with those changes
Thanks for the quick fix.