Skip to content

Commit baf0cd2

Browse files
committed
fix: make facade::detail::apply_normalized_specs compiling
1 parent 4a1b4e8 commit baf0cd2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

include/mimic++/Facade.hpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,15 @@ MIMICPP_DETAIL_MODULE_EXPORT namespace mimicpp::facade::detail
216216
static consteval auto evaluate_specs()
217217
{
218218
auto const end = std::ranges::end(specText);
219-
auto const find_token_begin = [&](auto const first) consteval noexcept {
220-
constexpr auto is_space = [](char const c) consteval noexcept {
219+
auto const find_token_begin = [&](auto const first) noexcept {
220+
// LCOV_EXCL_START
221+
// For whatever reason, marking this lambda as `consteval` does not compile...
222+
constexpr auto is_space = [](char const c) noexcept {
221223
return ' ' == c || '\t' == c;
222224
};
223225

224226
return std::ranges::find_if_not(first, end, is_space);
227+
// LCOV_EXCL_STOP
225228
};
226229

227230
spec_info result{};
@@ -264,12 +267,15 @@ MIMICPP_DETAIL_MODULE_EXPORT namespace mimicpp::facade::detail
264267
{
265268
MIMICPP_ASSERT(first != end, "First must point to the first keyword character.");
266269

267-
constexpr auto is_word_continue = [](char const c) consteval noexcept {
270+
constexpr auto is_keyword_continue = [](char const c) noexcept {
271+
// LCOV_EXCL_START
272+
// For whatever reason, marking this lambda as `consteval` does not compile...
268273
return ('a' <= c && c <= 'z')
269274
|| ('A' <= c && c <= 'Z');
275+
// LCOV_EXCL_STOP
270276
};
271277

272-
auto const tokenEnd = std::ranges::find_if_not(first + 1u, end, is_word_continue);
278+
auto const tokenEnd = std::ranges::find_if_not(first + 1u, end, is_keyword_continue);
273279
std::string_view const token{first, tokenEnd};
274280
if (constexpr std::string_view constKeyword{"const"};
275281
constKeyword == token)

0 commit comments

Comments
 (0)