Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: constexpr variable 'is_digit' must be initialized by a constant expression #444

Open
2dpdlja496or43iq opened this issue Apr 23, 2023 · 3 comments

Comments

@2dpdlja496or43iq
Copy link

C:/msys64/home/Administrator/ObEngine/extlibs/vili/src/utils.cpp:11:20: error: constexpr variable 'is_digit' must be initialized by a constant expression
    constexpr auto is_digit = static_cast<int (*)(int)>(std::isdigit);
                   ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Change constexpr to const solved the problem.

@Sygmei
Copy link
Member

Sygmei commented Apr 23, 2023

Strange, I don't have the issue on my side ! What's your compiler / version ?

@2dpdlja496or43iq
Copy link
Author

Strange, I don't have the issue on my side ! What's your compiler / version ?

MSYS2 CLANG64.

@Sygmei
Copy link
Member

Sygmei commented Apr 23, 2023

I'll try it out tomorrow, constexpr seems supported on other platforms

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

No branches or pull requests

2 participants