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

Mac M3. boost 1.86.0 Boost.Multiprecision compile error #638

Open
guangbinl opened this issue Sep 11, 2024 · 3 comments
Open

Mac M3. boost 1.86.0 Boost.Multiprecision compile error #638

guangbinl opened this issue Sep 11, 2024 · 3 comments

Comments

@guangbinl
Copy link

I use the boost header library in an Unreal Engine 5.4 C++ project on a Mac M3 computer, and a syntax error is prompted during the compilation process. How can I solve this problem? The error content is as follows:

0>is_backend.hpp(39,40): Error : statement expression not allowed at file scope
0> static constexpr bool value = sizeof(check(get())) == sizeof(double);
0> ^
0>is_backend.hpp(39,26): Error : constexpr variable 'value' must be initialized by a constant expression
0> static constexpr bool value = sizeof(check(get())) == sizeof(double);

@mborland
Copy link
Member

Do you have a minimal reproducer for how you encountered this error? Which language standard were you using?

@ckormanyos
Copy link
Member

a syntax error is prompted during the compilation process.

minimal reproducer for how you encountered this error?

Indeed. We need the use-case. Most of Multiprecision is not constexpr and not (yet, mabe later) intended to be. So we need to see exactly what is being queried at compile-time to judge if it should or should not be constexpr.

@jzmaddock
Copy link
Collaborator

In addition to the comments above, I have a hunch that this is the sort of error you might see from certain "vintage" compilers: so it would be good to know which compiler this is and the version.

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

4 participants