On 29/07/20 11:33 +0200, François Dumont via Libstdc++ wrote:
+using type4 = std::unordered_set<int, std::hash<int>, std::equal_to<int>,
+                                 not_noexcept_dflt_cons_alloc<std::pair<const int, 
int>>>;

A couple of these tests use the wrong allocator type, which means they
fail when compiled as C++20.

Fixed with this patch. Tested x86_64-linux, committed to trunk.


commit 357beca8bce179315bdf112c0f1df20ff5874f39
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Jul 30 18:41:47 2020

    libstdc++: Fix tests using wrong allocator type
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
            Use allocator with the correct value type.
            * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
            Likewise.

diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc
index b7c0d802125..8511cb95421 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc
@@ -62,7 +62,7 @@ template<typename _Tp>
   };
 
 using type4 = std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
-				      not_noexcept_dflt_cons_alloc<std::pair<const int, int>>>;
+				      not_noexcept_dflt_cons_alloc<int>>;
 
 static_assert(!std::is_nothrow_default_constructible<type4>::value,
 	      "not noexcept default constructible");
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc
index d60a81ffb7c..44db4aec6cf 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc
@@ -62,7 +62,7 @@ template<typename _Tp>
   };
 
 using type4 = std::unordered_set<int, std::hash<int>, std::equal_to<int>,
-				  not_noexcept_dflt_cons_alloc<std::pair<const int, int>>>;
+				 not_noexcept_dflt_cons_alloc<int>>;
 
 static_assert(!std::is_nothrow_default_constructible<type4>::value,
 	      "not noexcept default constructible");

Reply via email to