Skip to content

Conversation

@Julien-Blanc-tgcm
Copy link

  • Can be constexpr when c++ > 17

* Can be constexpr when c++ > 17

Signed-off-by: Julien Blanc <julien.blanc@tgcm.eu>
@pdimov
Copy link
Member

pdimov commented Dec 11, 2025

What part requires C++17?

@Julien-Blanc-tgcm
Copy link
Author

Well, that's what gcc tolds me. Trying to compile with C++14, i get

cc1plus: note:   ‘enum_to_string<E>(E, const char*)::<lambda(auto:10)>’ is a closure type, which is only literal in C++17 and later

I vaguely remember that lambdas could not be used in constexpr in C++14, i never had these rules right and i mostly target C++20 now, so i'll trust gcc on this.

@pdimov
Copy link
Member

pdimov commented Dec 15, 2025

Ah, the lambda. Well, this is fixable.

pdimov added a commit that referenced this pull request Dec 15, 2025
@pdimov
Copy link
Member

pdimov commented Dec 15, 2025

Implemented on develop.

@pdimov pdimov closed this Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants