Replace use of C++14 std::exchange in C++11 testcase
authorJonathan Wakely <jwakely@redhat.com>
Wed, 7 Dec 2016 15:22:57 +0000 (15:22 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 7 Dec 2016 15:22:57 +0000 (15:22 +0000)
* testsuite/28_regex/traits/char/user_defined.cc: Replace uses of
C++14 std::exchange function.

From-SVN: r243354

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc

index c102e607804e154a6f449dc839cb95aa71276d78..60123289caec4ef25fd49d47e4a98840d475d02b 100644 (file)
@@ -1,5 +1,8 @@
 2016-12-07  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/28_regex/traits/char/user_defined.cc: Replace uses of
+       C++14 std::exchange function.
+
        * testsuite/util/testsuite_hooks.h (THROW): Define.
        * testsuite/util/replacement_memory_operators.h: Include
        testsuite_hooks.h and use THROW macro.
index 5888ce1b4a04330f69aeac58060d968ddd10c643..d4f4abcc406653761d4bf494bf9db2faea91a0a6 100644 (file)
@@ -72,13 +72,15 @@ test01()
     VERIFY(!called_transform);
     basic_regex<char, MyRegexTraits<char>> re("[a]", regex::collate);
     VERIFY(regex_match("a", re));
-    VERIFY(exchange(called_transform, false));
+    VERIFY(called_transform);
+    called_transform = false;
   }
   {
     VERIFY(!called_nocase);
     basic_regex<char, MyRegexTraits<char>> re("[a]", regex::icase);
     VERIFY(regex_match("A", re));
-    VERIFY(exchange(called_nocase, false));
+    VERIFY(called_nocase);
+    called_nocase = false;
   }
   {
     basic_regex<char, MyRegexTraits<char>> re("[T-f]", regex::icase);