gcc/libstdc++-v3/testsuite
Jonathan Wakely e09366718a libstdc++: Reduce template instantiations in <regex>
This moves the last two template parameters of __regex_algo_impl to be
runtime function parameters instead, so that we don't need four
different instantiations for the possible ways to call it. Most of the
function (and what it instantiates) is the same in all cases, so making
them compile-time choices doesn't really have much benefit.

Use  'if constexpr' for conditions that check template parameters, so
that when we do depend on a compile-time condition we only instantiate
what we need to.

libstdc++-v3/ChangeLog:

	* include/bits/regex.h (__regex_algo_impl): Change __policy and
	__match_mode template parameters to be function parameters.
	(regex_match, regex_search): Pass policy and match mode as
	function arguments.
	* include/bits/regex.tcc (__regex_algo_impl): Change template
	parameters to function parameters.
	* include/bits/regex_compiler.h (_RegexTranslatorBase): Use
	'if constexpr' for conditions using template parameters.
	(_RegexTranslator): Likewise.
	* include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
	Likewise.
	* testsuite/util/testsuite_regex.h (regex_match_debug)
	(regex_search_debug): Move template arguments to function
	arguments.
2022-01-05 13:47:01 +00:00
..
17_intro Update copyright years. 2022-01-03 10:42:10 +01:00
18_support Update copyright years. 2022-01-03 10:42:10 +01:00
19_diagnostics Update copyright years. 2022-01-03 10:42:10 +01:00
20_util Update copyright years. 2022-01-03 10:42:10 +01:00
21_strings Update copyright years. 2022-01-03 10:42:10 +01:00
22_locale Update copyright years. 2022-01-03 10:42:10 +01:00
23_containers Update copyright years. 2022-01-03 10:42:10 +01:00
24_iterators Update copyright years. 2022-01-03 10:42:10 +01:00
25_algorithms Update copyright years. 2022-01-03 10:42:10 +01:00
26_numerics Update copyright years. 2022-01-03 10:42:10 +01:00
27_io Update copyright years. 2022-01-03 10:42:10 +01:00
28_regex Update copyright years. 2022-01-03 10:42:10 +01:00
29_atomics Update copyright years. 2022-01-03 10:42:10 +01:00
30_threads Update copyright years. 2022-01-03 10:42:10 +01:00
abi Update copyright years. 2022-01-03 10:42:10 +01:00
backward Update copyright years. 2022-01-03 10:42:10 +01:00
config Update copyright years. 2022-01-03 10:42:10 +01:00
data
decimal Update copyright years. 2022-01-03 10:42:10 +01:00
experimental Update copyright years. 2022-01-03 10:42:10 +01:00
ext Update copyright years. 2022-01-03 10:42:10 +01:00
lib Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-abi Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-dg Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-prettyprinters Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-xmethods Update copyright years. 2022-01-03 10:42:10 +01:00
performance Update copyright years. 2022-01-03 10:42:10 +01:00
special_functions Update copyright years. 2022-01-03 10:42:10 +01:00
std Update copyright years. 2022-01-03 10:42:10 +01:00
tr1 Update copyright years. 2022-01-03 10:42:10 +01:00
tr2 Update copyright years. 2022-01-03 10:42:10 +01:00
util libstdc++: Reduce template instantiations in <regex> 2022-01-05 13:47:01 +00:00
Makefile.am Update copyright years. 2022-01-03 10:42:10 +01:00
Makefile.in libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00