From d71f5aa799d0cce6863147512dd14db4b1763ad2 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 7 Dec 2016 15:22:57 +0000 Subject: [PATCH] Replace use of C++14 std::exchange in C++11 testcase * testsuite/28_regex/traits/char/user_defined.cc: Replace uses of C++14 std::exchange function. From-SVN: r243354 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c102e607804..60123289cae 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2016-12-07 Jonathan Wakely + * 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. diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc b/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc index 5888ce1b4a0..d4f4abcc406 100644 --- a/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc +++ b/libstdc++-v3/testsuite/28_regex/traits/char/user_defined.cc @@ -72,13 +72,15 @@ test01() VERIFY(!called_transform); basic_regex> 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> re("[a]", regex::icase); VERIFY(regex_match("A", re)); - VERIFY(exchange(called_nocase, false)); + VERIFY(called_nocase); + called_nocase = false; } { basic_regex> re("[T-f]", regex::icase); -- 2.30.2