Skip to content

r-sitko/cxx-modules-build2

Repository files navigation

Example application with C++ Modules Technical Specification feature

Description

Project shows example application with C++ Modules TS feature (which will be introduced in C++20 standard). For building code it uses build2 - an open source (MIT), cross-platform build toolchain with C++ Modules TS building support.

In cxx-modules-build2 directory there are application files with C++ code:

  • main.cpp contains main function, module import statements and uses math, std.io and std.core modules
  • math.cpp contains math module implementation
  • math.mpp contains math module interface

Prerequisites

Prerequisites for running application using Docker

Prerequisites for running application without using Docker

Running application

Running application using Docker

Being in root directory of project run in terminal:

sudo ./build_and_run.sh

Running application without using Docker

Being in root directory of project run in terminal:

bdep init -C @clang cc config.cxx=clang++
b
cxx-modules-build2/main

About

C++ Modules Technical Specification (TS) project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages