Search code examples
c++modulec++20c++builderc++builder-12-athens

Does C++Builder 12.0 support C++20 modules?


RAD Studio 12.0 has been released, and they supposedly upgraded C++Builder to Clang 15, but I can't find the module feature of C++20, is there any explanation?


Solution

  • The Clang 15 upgrade only applies to the Windows 64bit preview compiler, not to the rest of C++Builder's compilers, which are still based on Clang 3.3 and 5.0.

    Per C++Builder 12.0's documentation:

    Clang-enhanced C++ Compilers

    RAD Studio provides the following Clang-enhanced C++ compilers:

    Compiler Platform Clang Version LLVM Version
    BCC32C 32-bit Windows 5.0 5.0
    BCC32X 32-bit Windows 5.0 5.0
    BCC64 64-bit Windows 5.0 5.0
    BCC64X 64-bit Windows 15.0 15.0
    BCCIOSARM64 64-bit iOS 3.3 3.5
    BCCAARM Android 3.3 3.3

    Also:

    Modern C++ Language Features Compliance Status

    Note: C++2c is expected to be C++26.

    Note: BCC64X is currently a Preview. The below status is aspirational but untested and is not a guarantee of the final support. BCC64X uses C++17 as its default language level, and the initial release is not planned to support higher language levels. To compile to C++2c, run bcc64x with -std=c++2c.

    Note: C++23 is partially supported by the Clang version that BCC64X is based on and the C++ RTL and STL (libc+) that it uses. We expect that any language feature supported by both the Clang and the libc++ in versions 15 and earlier, work correctly. But it is not supported, even at the unsupported level that a Preview implies. However, the Preview of the BCC64X compiler currently aims at C++17 as its language standard. You can use -std=c++23 to change the target language compliance.

    Note: C++20 is partially supported by the Clang version that BCC64X is based on and the C++ RTL and STL (libc++) that it uses. We expect that any language feature supported by both the Clang and the libc++ in versions 15 and earlier, work correctly. But it is not supported, even at the unsupported level that a Preview implies. However, the Preview of the BCC64X compiler currently aims at C++17 as its language standard. You can use -std=c++20 to change the target language compliance.

    There is currently no mention in the documentation of support for specific features that are introduced after C++17.