Tolerate [[nodiscard]] annotations in the STL. Reviewed as https://reviews.llvm.org/D39033

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318276 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/containers/associative/map/map.ops/count0.pass.cpp b/test/std/containers/associative/map/map.ops/count0.pass.cpp
index 1fa8c4a..5649c57 100644
--- a/test/std/containers/associative/map/map.ops/count0.pass.cpp
+++ b/test/std/containers/associative/map/map.ops/count0.pass.cpp
@@ -30,10 +30,10 @@
 {
     {
     typedef std::map<int, double, transparent_less> M;
-    M().count(C2Int{5});
+    assert(M().count(C2Int{5}) == 0);
     }
     {
     typedef std::map<int, double, transparent_less_not_referenceable> M;
-    M().count(C2Int{5});
+    assert(M().count(C2Int{5}) == 0);
     }
 }
diff --git a/test/std/containers/associative/map/map.ops/count1.fail.cpp b/test/std/containers/associative/map/map.ops/count1.fail.cpp
index bd0bf2e..5ad1761 100644
--- a/test/std/containers/associative/map/map.ops/count1.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/count1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_no_type> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/count2.fail.cpp b/test/std/containers/associative/map/map.ops/count2.fail.cpp
index ff4bed8..bb1c32e 100644
--- a/test/std/containers/associative/map/map.ops/count2.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/count2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_private> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/count3.fail.cpp b/test/std/containers/associative/map/map.ops/count3.fail.cpp
index 55a463e..8964384 100644
--- a/test/std/containers/associative/map/map.ops/count3.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/count3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_not_a_type> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp b/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
index c254fb6..310db6d 100644
--- a/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
+++ b/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
@@ -30,10 +30,16 @@
 {
     {
     typedef std::map<int, double, transparent_less> M;
-    M().equal_range(C2Int{5});
+    typedef std::pair<typename M::iterator, typename M::iterator> P;
+    M example;
+    P result = example.equal_range(C2Int{5});
+    assert(result.first == result.second);
     }
     {
     typedef std::map<int, double, transparent_less_not_referenceable> M;
-    M().equal_range(C2Int{5});
+    typedef std::pair<typename M::iterator, typename M::iterator> P;
+    M example;
+    P result = example.equal_range(C2Int{5});
+    assert(result.first == result.second);
     }
 }
diff --git a/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
index a92ad96..381c275 100644
--- a/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_no_type> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
index 23357e2..adf4a47 100644
--- a/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_private> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
index 3ffa3f2..88b62a0 100644
--- a/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_not_a_type> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/find0.pass.cpp b/test/std/containers/associative/map/map.ops/find0.pass.cpp
index 76fe924..a11acb1 100644
--- a/test/std/containers/associative/map/map.ops/find0.pass.cpp
+++ b/test/std/containers/associative/map/map.ops/find0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::map<int, double, transparent_less> M;
-    M().find(C2Int{5});
+    M example;
+    assert(example.find(C2Int{5}) == example.end());
     }
     {
     typedef std::map<int, double, transparent_less_not_referenceable> M;
-    M().find(C2Int{5});
+    M example;
+    assert(example.find(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/map/map.ops/find1.fail.cpp b/test/std/containers/associative/map/map.ops/find1.fail.cpp
index 5346821..ca4ec43 100644
--- a/test/std/containers/associative/map/map.ops/find1.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/find1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_no_type> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/find2.fail.cpp b/test/std/containers/associative/map/map.ops/find2.fail.cpp
index 1dfb7fa..cf8db60 100644
--- a/test/std/containers/associative/map/map.ops/find2.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/find2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_private> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/find3.fail.cpp b/test/std/containers/associative/map/map.ops/find3.fail.cpp
index f5e92b8..79a4ae0 100644
--- a/test/std/containers/associative/map/map.ops/find3.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/find3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_not_a_type> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp b/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
index de7a545..2936da3 100644
--- a/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
+++ b/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::map<int, double, transparent_less> M;
-    M().lower_bound(C2Int{5});
+    M example;
+    assert(example.lower_bound(C2Int{5}) == example.end());
     }
     {
     typedef std::map<int, double, transparent_less_not_referenceable> M;
-    M().lower_bound(C2Int{5});
+    M example;
+    assert(example.lower_bound(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
index 6a3ed96..0646847 100644
--- a/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_no_type> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
index 87fffe7..f603007 100644
--- a/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_private> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
index fbccd3a..40fb5ff 100644
--- a/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_not_a_type> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp b/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
index 94508d2..fa97a71 100644
--- a/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
+++ b/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::map<int, double, transparent_less> M;
-    M().upper_bound(C2Int{5});
+    M example;
+    assert(example.upper_bound(C2Int{5}) == example.end());
     }
     {
     typedef std::map<int, double, transparent_less_not_referenceable> M;
-    M().upper_bound(C2Int{5});
+    M example;
+    assert(example.upper_bound(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
index cb23588..2badd99 100644
--- a/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_no_type> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
index 1fa4cbc..9a6e2be 100644
--- a/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_private> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
index 0f3cea2..f7a7dcd 100644
--- a/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
+++ b/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::map<int, double, transparent_less_not_a_type> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
index 289d405..db84dcf 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
@@ -30,10 +30,10 @@
 {
     {
     typedef std::multimap<int, double, transparent_less> M;
-    M().count(C2Int{5});
+    assert(M().count(C2Int{5}) == 0);
     }
     {
     typedef std::multimap<int, double, transparent_less_not_referenceable> M;
-    M().count(C2Int{5});
+    assert(M().count(C2Int{5}) == 0);
     }
 }
diff --git a/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
index 70464b1..bb15f67 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
@@ -33,6 +33,6 @@
 {
     typedef std::multimap<int, double, transparent_less_no_type> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
index ad15ff4..779af38 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
@@ -33,6 +33,6 @@
 {
     typedef std::multimap<int, double, transparent_less_private> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
index 5e6c9ab..6fb1f4d 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
@@ -33,6 +33,6 @@
 {
     typedef std::multimap<int, double, transparent_less_not_a_type> M;
 
-    M().count(C2Int{5});
+    (void)M().count(C2Int{5});
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
index 8cdd3c0..0c09389 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
@@ -30,10 +30,16 @@
 {
     {
     typedef std::multimap<int, double, transparent_less> M;
-    M().equal_range(C2Int{5});
+    typedef std::pair<typename M::iterator, typename M::iterator> P;
+    M example;
+    P result = example.equal_range(C2Int{5});
+    assert(result.first == result.second);
     }
     {
     typedef std::multimap<int, double, transparent_less_not_referenceable> M;
-    M().equal_range(C2Int{5});
+    typedef std::pair<typename M::iterator, typename M::iterator> P;
+    M example;
+    P result = example.equal_range(C2Int{5});
+    assert(result.first == result.second);
     }
 }
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
index a339467..20c30fe 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
@@ -33,6 +33,6 @@
 {
     typedef std::multimap<int, double, transparent_less_no_type> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
index 633e061..a36fc1f 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_private> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
index 34b1b4b..a249776 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_not_a_type> M;
 
-    M().equal_range(C2Int{5});
+    (void)M().equal_range(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
index a06ec4d..0cff611 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::multimap<int, double, transparent_less> M;
-    M().find(C2Int{5});
+    M example;
+    assert(example.find(C2Int{5}) == example.end());
     }
     {
     typedef std::multimap<int, double, transparent_less_not_referenceable> M;
-    M().find(C2Int{5});
+    M example;
+    assert(example.find(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
index bc35932..3df8267 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_no_type> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
index 254f524..32435f9 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_private> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
index 2805f47..011c61c 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_not_a_type> M;
 
-    M().find(C2Int{5});
+    (void)M().find(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
index 1000aa7..4a882af 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::multimap<int, double, transparent_less> M;
-    M().lower_bound(C2Int{5});
+    M example;
+    assert(example.lower_bound(C2Int{5}) == example.end());
     }
     {
     typedef std::multimap<int, double, transparent_less_not_referenceable> M;
-    M().lower_bound(C2Int{5});
+    M example;
+    assert(example.lower_bound(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
index 4b0db47..df8cb38 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_no_type> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
index 300364c..9c7fdcd 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_private> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
index 0996309..34eeddc 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_not_a_type> M;
 
-    M().lower_bound(C2Int{5});
+    (void)M().lower_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
index 1a572e9..d761814 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
@@ -30,10 +30,12 @@
 {
     {
     typedef std::multimap<int, double, transparent_less> M;
-    M().upper_bound(C2Int{5});
+    M example;
+    assert(example.upper_bound(C2Int{5}) == example.end());
     }
     {
     typedef std::multimap<int, double, transparent_less_not_referenceable> M;
-    M().upper_bound(C2Int{5});
+    M example;
+    assert(example.upper_bound(C2Int{5}) == example.end());
     }
 }
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
index 10e59c5..67a26a2 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_no_type> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
index 81ebbb8..35e79da 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_private> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
index fe41315..eb3edb6 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
@@ -34,7 +34,7 @@
     {
     typedef std::multimap<int, double, transparent_less_not_a_type> M;
 
-    M().upper_bound(C2Int{5});
+    (void)M().upper_bound(C2Int{5});
     }
 }
 #endif
diff --git a/test/std/iterators/iterators.general/gcc_workaround.pass.cpp b/test/std/iterators/iterators.general/gcc_workaround.pass.cpp
index 6522bd3..28a5e95 100644
--- a/test/std/iterators/iterators.general/gcc_workaround.pass.cpp
+++ b/test/std/iterators/iterators.general/gcc_workaround.pass.cpp
@@ -11,10 +11,10 @@
 
 #include <string>
 
-void f(const std::string &s) { s.begin(); }
+void f(const std::string &s) { (void)s.begin(); }
 
 #include <vector>
 
-void AppendTo(const std::vector<char> &v) { v.begin(); }
+void AppendTo(const std::vector<char> &v) { (void)v.begin(); }
 
 int main() {}
diff --git a/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp b/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
index d2ad79a..71b0eac 100644
--- a/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
+++ b/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
@@ -43,8 +43,8 @@
     }
     {
     int a[] = {1,2,3,4};
-    std::make_move_iterator(a+4);
-    std::make_move_iterator(a); // test for LWG issue 2061
+    (void)std::make_move_iterator(a+4);
+    (void)std::make_move_iterator(a); // test for LWG issue 2061
     }
 
 #if TEST_STD_VER > 14
diff --git a/test/std/strings/basic.string/string.access/at.pass.cpp b/test/std/strings/basic.string/string.access/at.pass.cpp
index 8916489..8bfb829 100644
--- a/test/std/strings/basic.string/string.access/at.pass.cpp
+++ b/test/std/strings/basic.string/string.access/at.pass.cpp
@@ -35,7 +35,7 @@
     {
         try
         {
-            s.at(pos);
+            (void)s.at(pos);
             assert(false);
         }
         catch (std::out_of_range&)
@@ -44,7 +44,7 @@
         }
         try
         {
-            cs.at(pos);
+            (void)cs.at(pos);
             assert(false);
         }
         catch (std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
index bc2bf65..6ca473f 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
@@ -45,7 +45,7 @@
     {
         try
         {
-            s.compare(pos1, n1, sv, pos2, n2);
+            (void)s.compare(pos1, n1, sv, pos2, n2);
             assert(false);
         }
         catch (const std::out_of_range&)
@@ -69,7 +69,7 @@
     {
         try
         {
-            s.compare(pos1, n1, sv, pos2);
+            (void)s.compare(pos1, n1, sv, pos2);
             assert(false);
         }
         catch (const std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
index 13f6c5a..0f58fdc 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
@@ -40,7 +40,7 @@
     {
         try
         {
-            s.compare(pos1, n1, str);
+            (void)s.compare(pos1, n1, str);
             assert(false);
         }
         catch (std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
index fc811c8..5761b75 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
@@ -40,7 +40,7 @@
     {
         try
         {
-            s.compare(pos, n1, str, n2);
+            (void)s.compare(pos, n1, str, n2);
             assert(false);
         }
         catch (std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
index b3d7da2..c543e73 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
@@ -40,7 +40,7 @@
     {
         try
         {
-            s.compare(pos1, n1, str);
+            (void)s.compare(pos1, n1, str);
             assert(false);
         }
         catch (std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
index 42bba9d..6e63813 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp
@@ -42,7 +42,7 @@
     {
         try
         {
-            s.compare(pos1, n1, str, pos2, n2);
+            (void)s.compare(pos1, n1, str, pos2, n2);
             assert(false);
         }
         catch (const std::out_of_range&)
@@ -65,7 +65,7 @@
     {
         try
         {
-            s.compare(pos1, n1, str, pos2);
+            (void)s.compare(pos1, n1, str, pos2);
             assert(false);
         }
         catch (const std::out_of_range&)
diff --git a/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp b/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
index 6a5ba22..1e025c7 100644
--- a/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
+++ b/test/std/strings/basic.string/string.ops/string_compare/size_size_string_view.pass.cpp
@@ -40,7 +40,7 @@
     {
         try
         {
-            s.compare(pos1, n1, sv);
+            (void)s.compare(pos1, n1, sv);
             assert(false);
         }
         catch (std::out_of_range&)
diff --git a/test/std/strings/string.view/string.view.access/at.pass.cpp b/test/std/strings/string.view/string.view.access/at.pass.cpp
index 6df8798..7d5cf24 100644
--- a/test/std/strings/string.view/string.view.access/at.pass.cpp
+++ b/test/std/strings/string.view/string.view.access/at.pass.cpp
@@ -32,7 +32,7 @@
     }
 
 #ifndef TEST_HAS_NO_EXCEPTIONS
-    try { sv.at(len); } catch ( const std::out_of_range & ) { return ; }
+    try { (void)sv.at(len); } catch ( const std::out_of_range & ) { return ; }
     assert ( false );
 #endif
 }
diff --git a/test/std/utilities/any/any.nonmembers/make_any.pass.cpp b/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
index 5a4a3c3..d98b8d6 100644
--- a/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
+++ b/test/std/utilities/any/any.nonmembers/make_any.pass.cpp
@@ -115,14 +115,14 @@
 {
     {
         try {
-            std::make_any<Type>(101);
+            (void)std::make_any<Type>(101);
             assert(false);
         } catch (int const&) {
         }
     }
     {
         try {
-            std::make_any<Type>({1, 2, 3}, 101);
+            (void)std::make_any<Type>({1, 2, 3}, 101);
             assert(false);
         } catch (int const&) {
         }
diff --git a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index 117dd97..73cf073 100644
--- a/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ b/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -126,7 +126,7 @@
     // test heterogeneous lookups
     std::set<std::shared_ptr<X>, std::owner_less<>> s;
     std::shared_ptr<void> vp;
-    s.find(vp);
+    assert(s.find(vp) == s.end());
     }
 #endif
 }
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
index 44e6e73..bbc7001 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp
@@ -69,7 +69,7 @@
         optional<X> opt;
         try
         {
-            opt.value();
+            (void)opt.value();
             assert(false);
         }
         catch (const bad_optional_access&)
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
index e2d48ec..c644fb9 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp
@@ -61,7 +61,7 @@
         const optional<X> opt;
         try
         {
-            opt.value();
+            (void)opt.value();
             assert(false);
         }
         catch (const bad_optional_access&)
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
index 874a544..5347d3f 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp
@@ -61,7 +61,7 @@
         const optional<X> opt;
         try
         {
-            std::move(opt).value();
+            (void)std::move(opt).value();
             assert(false);
         }
         catch (const bad_optional_access&)
diff --git a/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp b/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
index 60cab7d..1a577e6 100644
--- a/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
+++ b/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp
@@ -67,7 +67,7 @@
         optional<X> opt;
         try
         {
-            std::move(opt).value();
+            (void)std::move(opt).value();
             assert(false);
         }
         catch (const bad_optional_access&)
diff --git a/test/std/utilities/variant/variant.get/get_index.pass.cpp b/test/std/utilities/variant/variant.get/get_index.pass.cpp
index 4f04f4a..0ec6530 100644
--- a/test/std/utilities/variant/variant.get/get_index.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_index.pass.cpp
@@ -259,7 +259,7 @@
   auto test = [](auto idx, auto &&v) {
     using Idx = decltype(idx);
     try {
-      std::get<Idx::value>(std::forward<decltype(v)>(v));
+      (void)std::get<Idx::value>(std::forward<decltype(v)>(v));
     } catch (const std::bad_variant_access &) {
       return true;
     } catch (...) { /* ... */
diff --git a/test/std/utilities/variant/variant.get/get_type.pass.cpp b/test/std/utilities/variant/variant.get/get_type.pass.cpp
index 63221f6..5d9213e 100644
--- a/test/std/utilities/variant/variant.get/get_type.pass.cpp
+++ b/test/std/utilities/variant/variant.get/get_type.pass.cpp
@@ -259,7 +259,7 @@
   auto test = [](auto idx, auto &&v) {
     using Idx = decltype(idx);
     try {
-      std::get<typename Idx::type>(std::forward<decltype(v)>(v));
+      (void)std::get<typename Idx::type>(std::forward<decltype(v)>(v));
     } catch (const std::bad_variant_access &) {
       return true;
     } catch (...) { /* ... */