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
18_support
19_diagnostics
20_util
21_strings
22_locale
23_containers
24_iterators
25_algorithms
26_numerics
27_io
28_regex
29_atomics
30_threads
abi
backward
config
data
decimal
experimental
ext
lib
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions
std
tr1
tr2
util libstdc++: Reduce template instantiations in <regex> 2022-01-05 13:47:01 +00:00
Makefile.am
Makefile.in