-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly mark the result of detail::names as constexpr
It might make no sense, but on MSVC it can generate a compile-time error, especially if an enumerator's value is out of range. Example: error C3615: constexpr function 'magic_enum::detail::names' cannot result in a constant expression ... note: failure was caused by call of undefined function or one not declared 'constexpr' ... note: see usage of '__builtin_array_init_helper'
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters