Which compilers support C++20 modules?

Which Compilers Support C++20 Modules?

C++20 is the latest version of the C++ programming language, and one of its key features is the introduction of Modules. Modules allow developers to organize their code in a more modular and flexible way, making it easier to maintain and update their projects. But, not all compilers support C++20 modules yet. In this article, we will explore which compilers currently support C++20 modules.

GCC

The GNU Compiler Collection (GCC) is one of the most popular compilers for C++ programming. And, GCC 8 and later versions support C++20 modules. This means that developers using GCC 8 or later can take advantage of the new features and improvements brought by C++20.

GCC Version C++20 Module Support
GCC 8 Yes
GCC 9 Yes
GCC 10 Yes

Clang

Clang is another popular compiler for C++ programming, developed by LLVM. And, Clang 9 and later versions support C++20 modules. This means that developers using Clang 9 or later can take advantage of the new features and improvements brought by C++20.

Clang Version C++20 Module Support
Clang 9 Yes
Clang 10 Yes
Clang 11 Yes

MSVC

Microsoft Visual C++ (MSVC) is a popular compiler for Windows development. And, MSVC 14.20 and later versions support C++20 modules. This means that developers using MSVC 14.20 or later can take advantage of the new features and improvements brought by C++20.

MSVC Version C++20 Module Support
MSVC 14.20 Yes
MSVC 14.25 Yes
MSVC 15.00 Yes

CMake

CMake is a popular build system for C++ projects. And, CMake 3.26 and later versions support C++20 modules. This means that developers using CMake 3.26 or later can take advantage of the new features and improvements brought by C++20.

CMake Version C++20 Module Support
CMake 3.26 Yes
CMake 3.28 Yes
CMake 3.30 Yes

Conclusion

In conclusion, the following compilers currently support C++20 modules:

  • GCC 8 and later versions
  • Clang 9 and later versions
  • MSVC 14.20 and later versions
  • CMake 3.26 and later versions

Developers can take advantage of the new features and improvements brought by C++20 using these compilers.

Your friends have asked us these questions - Check out the answers!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top