]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/is_swappable/value.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / is_swappable / value.h
index 410b3898cf502833c3bfb67b3b5fe2669a64b1c6..c532c8323d11ffd0208708d5a22407e3baaa4576 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015-2020 Free Software Foundation, Inc.
+// Copyright (C) 2015-2023 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -55,6 +55,13 @@ namespace funny {
   {
     friend void swap(F3&, F3) {}
   };
+
+  struct DummyCmp
+  {
+    template<class T>
+      bool operator()(const T&, const T&) const
+      { return false; }
+  };
 }
 void test01()
 {
@@ -152,7 +159,9 @@ void test01()
   static_assert(test_property<is_swappable,
                std::priority_queue<int>[1][2][3]>(true), "");
   static_assert(test_property<is_swappable,
-               std::priority_queue<construct::Nontrivial>>(true), "");
+               std::priority_queue<construct::Nontrivial,
+                                   std::vector<construct::Nontrivial>,
+                                   funny::DummyCmp>>(true), "");
   static_assert(test_property<is_swappable,
                std::stack<int>>(true), "");
   static_assert(test_property<is_swappable,