Commit d71f5aa7 by Jonathan Wakely Committed by Jonathan Wakely

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
parent 1f153a1d
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.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment