FreeBSD Release 14.0 and clang++ 2020 std::format

I just upgraded to FreeBSD Rel 14 and it install clang++ 16.0.6. I went to recompile some code that uses the 2020 format stuff and I get errors say format is not defined. The header there, but when I look at the header the code was commented out. Any one know what's up with this?
 
I just upgraded to FreeBSD Rel 14 and it install clang++ 16.0.6. I went to recompile some code that uses the 2020 format stuff and I get errors say format is not defined. The header there, but when I look at the header the code was commented out. Any one know what's up with this?
 
I saw this symbol reference inside /usr/include/c++/v1/format ...

_LIBCPP_HAS_NO_INCOMPLETE_FORMAT

No idea what is going on there. Re-compiling with

#define _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
or -D_LIBCPP_HAS_NO_INCOMPLETE_FORMAT

might be interesting.
 
I found the problem. You have to add:
-fexperimental-library
to the compiler flags. This was added to clang++ 16 I think,

It should be noted they're deprecating the wstring_convert template in C++17 and removing it in C++26, however there's currently no replacement. And when I was on FreeBSD 13.2 and clang++ 14 using -std=c++2a (2020) neither problem showed up.
 
Back
Top