gcc/libstdc++-v3/testsuite
Jonathan Wakely f38cd3bdb4 libstdc++: Implement std::regex_constants::multiline (LWG 2503)
This implements LWG 2503, which allows ^ and $ to match line terminator
characters, rather than only matching the beginning and end of the
entire input. The multiline option is only valid for ECMAScript, but
for other grammars we ignore it rather than throwing an exception.

This is related to PR libstdc++/102480, which incorrectly said that
ECMAscript should match the beginning of a line when match_prev_avail
is used. I think that's only supposed to happen when multiline is used.

The new regex_constants::multiline and basic_regex::multiline constants
are not defined for strict -std=c++11 and -std=c++14 modes, but
regex_constants::__multiline is always defined, so that the
implementation can use it internally.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex.h (basic_regex::multiline): Define constant
	for C++17.
	* include/bits/regex_constants.h (regex_constants::multiline):
	Define constant for C++17.
	(regex_constants::__multiline): Define duplicate constant for
	internal use in C++11 and C++14.
	* include/bits/regex_executor.h (_Executor::_M_match_multiline()):
	New member function.
	(_Executor::_M_is_line_terminator(_CharT)): New member function.
	(_Executor::_M_at_begin(), _Executor::_M_at_end()): Use new
	member functions to support multiline matches.
	* testsuite/28_regex/algorithms/regex_match/multiline.cc: New test.
2021-09-29 13:48:19 +01:00
..
17_intro libstdc++: Fix 17_intro/names.cc failures on Solaris 2021-08-31 14:17:53 +01:00
18_support libstdc++: Add [[nodiscard]] to <compare> 2021-08-05 15:16:58 +01:00
19_diagnostics libstdc++: Disable PCH for test that depends on a macro being defined 2021-09-23 16:07:39 +01:00
20_util libstdc++: Fix 48631_neg test in _GLIBCXX_INLINE_VERSION mode 2021-09-28 22:09:48 +02:00
21_strings libstdc++: Add [[nodiscard]] to iterators and related utilities 2021-08-04 12:54:28 +01:00
22_locale libstdc++: Fix new test for C++98 mode [PR 89728] 2021-06-01 19:02:42 +01:00
23_containers libstdc++: Skip container adaptor tests that fail concept checks 2021-09-28 20:22:51 +01:00
24_iterators libstdc++: Fix concept checks for iterators 2021-09-28 20:22:51 +01:00
25_algorithms libstdc++: Improve types used as iterators in testsuite 2021-09-28 20:22:51 +01:00
26_numerics libstdc++: Rename tests with incorrect extension 2021-09-17 12:40:41 +01:00
27_io libstdc++: Rename tests with incorrect extension 2021-09-17 12:40:41 +01:00
28_regex libstdc++: Implement std::regex_constants::multiline (LWG 2503) 2021-09-29 13:48:19 +01:00
29_atomics libstdc++: Fix UB in atomic_ref/wait_notify.cc [PR101761] 2021-09-16 14:48:17 -07:00
30_threads c++: limit instantiation with ill-formed class [PR96286] 2021-08-30 17:25:21 -04:00
abi
backward
config
data
decimal
experimental libstdc++: Use "test.invalid." for invalid hostname 2021-09-10 15:10:21 +01:00
ext libstdc++: Increase timeout factor for slow pb_ds tests 2021-09-16 23:06:38 +01:00
lib libstdc++: Avoid illegal argument to verbose in dg-test callback, continued 2021-08-17 21:05:27 +02:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Fix vector<bool> printer tests to work in debug mode 2021-08-18 14:26:38 +01:00
libstdc++-xmethods
performance
special_functions
std libstdc++: Add default template argument to basic_istream_view 2021-08-23 16:17:10 +01:00
tr1 libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
tr2
util libstdc++: Fix last std::tuple constructor missing 'constexpr' [PR102270] 2021-09-17 20:43:34 +01:00
Makefile.am libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00
Makefile.in libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00