[build2] Constraining the C++ standard

lyrahgames lyrahgames at mailbox.org
Thu Jul 6 20:52:51 UTC 2023


Boris Kolpackov <boris at codesynthesis.com> wrote:

>> This should be:
> 
> cxx.std = 14

Thank you this clarification. Way easier than I thought.
The formatting of the sentence
"Fixing the standard (for example, to c++11, c++14, etc) should work 
theoretically."
in the build system manual made me think that 'cxx.std' takes values, 
like 'c++11'.

> It's not ideal but probably ok. It's not ideal because the library is
> tested with the standard other than what it will be used with.

Then I will leave it like that.

>>  "error: C++c++14 is not supported by Microsoft (R) C/C++ Optimizing 
>> Compiler
>>  Version 19.36.32534 for x64"
> 
> That's because you've specified c++14 rather than 14 in cxx.std.

Yes, perfect. Now it works!

>> Yeah, I don't think there is anything else you can do about this 
>> (other
> that dropping the library altogether). Maybe add a warning to the 
> README
> that the library is always built with C++17 and whether it will work 
> in
> a mixed-standard environment is anyones' guess.

Good to know. I will do so. Thank you.





More information about the users mailing list