PH-Bench 0 Posted Thursday at 05:40 AM (edited) I would like to compile some console application examples in C++ builder (Rad Studio 12.3). However, when I run certain examples, I receive this error. [bcc64x Error] File1.cpp(6): no member named 'format' in namespace 'std' I know the culprit is this line: using std::format; My question is can I update C++ Builder to use C++ 20 so that I can run lines like that without error? If so how? Thanks Edited Thursday at 05:43 AM by PH-Bench Share this post Link to post
Remy Lebeau 1533 Posted Thursday at 02:53 PM (edited) 20 hours ago, PH-Bench said: can I update C++ Builder to use C++ 20 so that I can run lines like that without error? No, you cannot update the compiler. C++Builder simply does not support C++20 at this time, only up to C++17. Although, the BCC64X 64bit preview compiler does have partial support due to using Clang 15, whereas the other compilers in C++Builder do not as they are still using older Clang versions: https://stackoverflow.com/questions/77456540/does-cbuilder-12-0-support-c20-modules However, you can use the 3rd party {fmt} library, which implements many of C++20's formatting capabilities in pre-20 versions of C++: https://fmt.dev https://github.com/fmtlib/fmt Edited Friday at 02:21 AM by Remy Lebeau Share this post Link to post
PH-Bench 0 Posted Friday at 12:07 AM Hi, thanks for the answer. I am sure this has to be enabled. Could you direct me to instructions to enable it? Thanks Share this post Link to post
Remy Lebeau 1533 Posted Friday at 02:23 AM 2 hours ago, PH-Bench said: Hi, thanks for the answer. I am sure this has to be enabled. Could you direct me to instructions to enable it? Thanks You can't just "enable" C++20 in C++Builder's current compilers, as it is NOT IMPLEMENTED in any of them at all - except for the BCC64X preview compiler, in which case the page I linked you to earlier tells you how to "enable" it. Share this post Link to post