boostorg / multiprecision

Boost.Multiprecision
Boost Software License 1.0
194 stars 111 forks source link

C2131 expression did not evaluate to a constraint #566

Closed darkpotpot closed 11 months ago

darkpotpot commented 11 months ago

Hi,

I'm currently updating my projects in order to use c++20 and I'm having trouble with one of them. It uses boost geometry (which uses boost multiprecision), and at some point in the compilation it failed with the following error:

C2131 expression did not evaluate to a constraint

If I dig a little bit, the error comes from 2 files :

I'm using Visual studio 2022 with v142 "platform toolset" and ISO C++20 "language standard" Boost version is 1.83.0

Does anybody know how I can get rid of the issue ?

Regards

Julien

Edit : I wrongly suspected language standard. It fails with all. During the update I switched from boost 1.72 to 1.83 because of issues in c++20 with others boost modules. So in fact it came from this update, I tested several version and issue appears in 1.78.0. All release after this one shows the issue Version 1.77.0 and previous are running fine

jzmaddock commented 11 months ago

That's strange, we obviously test with MSVC (and I use for development here), and I haven't seen that. Do you have a reduced self-contained test case I can look at?

ckormanyos commented 11 months ago

using Visual studio 2022 with v142

This one thing struck me as a bit unconventional... 2022 ships with 143. I don't se why this could be responsible for strange behavior but it is a non-standard config?

darkpotpot commented 11 months ago

Thanks for the answer, I'll try reproducing it with a minimal example and post it here

darkpotpot commented 11 months ago

Hm, culprit found. It was caused by another 3rd party lib (APDFL). Sorry for the trouble