]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/25_algorithms/minmax/3.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 25_algorithms / minmax / 3.cc
index f0944b0bfde8db28c89d26109245a339c456d7d6..11d18e15d2e6db25ca96547663945bc6bbed66e0 100644 (file)
@@ -1,8 +1,8 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
 
 // 2008-09-16  Chris Fairles  <chris.fairles@gmail.com>
 
-// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2008-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
 #include <testsuite_hooks.h>
 
 struct compare_counter
-  : std::binary_function<int, int, bool>
 {
+  typedef int result_type;
+  typedef int first_argument_type;
+  typedef bool second_argument_type;
+
   static int count;
   
   bool operator()(int a, int b) const
@@ -39,10 +42,7 @@ int compare_counter::count = 0;
 
 void test01()
 {
-  bool test __attribute__((unused)) = true;
-
-  std::pair<int, int> z = std::minmax({1, 2, 3, 4, 5, 6, 7, 8},
-                                     compare_counter());
+  std::minmax({1, 2, 3, 4, 5, 6, 7, 8}, compare_counter());
 
   // If N is the number of arguments in the minmax function call, 
   // 25.3.7 specifies that at most 3N/2 comparisons are allowed.