aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-12-18 18:31:16 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-04-29 19:54:35 +0100
commit52e2bcbd936ed7cc567fe086480076547d2df6b5 (patch)
tree6af43a4c5ebe2ef67961a121e98baf6f9b7083db /gcc/rust/backend/rust-compile-expr.h
parentd84fbc516ea57de7e88fce76ff6f342ee808c02e (diff)
downloadgcc-52e2bcbd936ed7cc567fe086480076547d2df6b5.zip
gcc-52e2bcbd936ed7cc567fe086480076547d2df6b5.tar.gz
gcc-52e2bcbd936ed7cc567fe086480076547d2df6b5.tar.bz2
libstdc++: Use constexpr-if to slightly simplify <regex>
This will hardly make a dent in the very slow compile times for <regex> but it seems worth doing anyway. libstdc++-v3/ChangeLog: * include/bits/regex_compiler.h: Replace _GLIBCXX17_CONSTEXPR with constexpr and disable diagnostics with pragmas. (_AnyMatcher::operator()): Use constexpr-if instead of tag dispatching. Postpone calls to _M_translate until after checking result of earlier calls. (_AnyMatcher::_M_apply): Remove both overloads. (_BracketMatcher::operator(), _BracketMatcher::_M_ready): Replace tag dispatching with 'if constexpr'. (_BracketMatcher::_M_apply(_CharT, true_type)): Remove. (_BracketMatcher::_M_apply(_CharT, false_type)): Remove second parameter. (_BracketMatcher::_M_make_cache): Remove both overloads. * include/bits/regex_compiler.tcc (_BracketMatcher::_M_apply): Remove second parameter. * include/bits/regex_executor.tcc: Replace _GLIBCXX17_CONSTEXPR with constexpr and disable diagnostics with pragmas. (_Executor::_M_handle_backref): Replace __glibcxx_assert with static_assert. (_Executor::_M_handle_accept): Mark _S_opcode_backref case as unreachable for non-DFS mode and do not instantiate _M_handle_backref for that case. Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions