Clang Flips On Modules Support With C++2A Switch

Written by Michael Larabel in LLVM on 15 April 2019 at 07:16 AM EDT. 11 Comments
LLVM
With modules being an accepted feature for C++20, LLVM's Clang compiler has now enabled the functionality when tapping the compiler's experimental support via the -std=c++2a compiler switch.

The LLVM Clang compiler has offered experimental modules support already but has required the -fmodules-ts compiler switch to enable the functionality. With modules now officially approved for C++20, the functionality will also be available when using the standard -std=c++2a switch.

C++ modules are the new alternative to C++ header files aimed to provide better compile-time scalability and smoother/simpler behavior for software libraries than conventional header files with a mess of pre-processing that comes with it.

As of this weekend, Clang flipped on the modules support when C++2A is specified as the to-be-used C++ standard for compilation. This is a change to be found with Clang 9.0.

Those wishing to learn more about Clang's support for this big feature and the C++ modules functionality in general can learn more via the LLVM/Clang documentation.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week