C++20 concepts require parens around atomic constraints that are not
primary-expressions.

Tested x86_64-pc-linux-gnu, applying to trunk.

        * include/std/memory (uses_allocator_construction_args): Add parens
        around constraint.
---
 libstdc++-v3/ChangeLog          | 5 +++++
 libstdc++-v3/include/std/memory | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8e96a898483..a88e73836b2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-16  Jason Merrill  <ja...@redhat.com>
+
+       * include/std/memory (uses_allocator_construction_args): Add parens
+       around constraint.
+
 2019-07-12  Jonathan Wakely  <jwak...@redhat.com>
 
        * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory
index 3660f4d86de..3036802f8c3 100644
--- a/libstdc++-v3/include/std/memory
+++ b/libstdc++-v3/include/std/memory
@@ -261,7 +261,7 @@ get_pointer_safety() noexcept { return 
pointer_safety::relaxed; }
     uses_allocator_construction_args(const _Alloc& __a,
                                     _Args&&... __args) noexcept
 #if __cpp_concepts
-    requires ! _Std_pair<_Tp>
+    requires (! _Std_pair<_Tp>)
 #endif
     {
       return std::__uses_alloc_args<_Tp>(__a, std::forward<_Args>(__args)...);

base-commit: 56e35b0b1490442b7c8f506febaf15d3a42f65e1
-- 
2.21.0

Reply via email to