Skip to content

Commit 9224d6a

Browse files
committed
Fix: defined(__cpp_consteval)
1 parent 70c436f commit 9224d6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

less_slow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,11 @@ BENCHMARK_CAPTURE(parse_regex, long_, long_config_text)->MinTime(2);
25902590
*/
25912591
#include <ctre.hpp>
25922592

2593+
#if defined(__cpp_consteval)
25932594
consteval auto regex_for_config_ctre() { return ctre::multiline_search_all<R"(^\s*([^#:\s]+)\s*:\s*([^#:\s]+)\s*?$)">; }
2595+
#else
2596+
constexpr auto regex_for_config_ctre() { return ctre::multiline_search_all<R"(^\s*([^#:\s]+)\s*:\s*([^#:\s]+)\s*?$)">; }
2597+
#endif
25942598

25952599
void config_parse_ctre(std::string_view config_text, std::vector<std::pair<std::string, std::string>> &settings) {
25962600
// ! CTRE isn't currently handling the `$` anchor correctly.

0 commit comments

Comments
 (0)