C++20 modules examples

Overview

C++20 Modules Examples

This repository contains a number of examples that demonstrate various C++20 modules features and their support in build2. For a discussion of the demonstrated functionality see Complete C++20 Modules Support with GCC.

hello-module -- module example

hello-partition -- module partition example

hello-header-import -- header unit importation example

hello-header-translate -- header include translation example

hello-library-module -- module library example

hello-library-header -- header importation/translation library example

While you can build each example individually (see README in each example for details), you can also build them all at once in a shared build configuration, for example:

git clone https://github.com/build2/cxx20-modules-examples.git
cd cxx20-modules-examples

bdep init -C @gcc cc config.cxx=g++ config.cxx.translate_include=all-importable
bdep update @gcc
You might also like...
Examples for individual ROS2 functionalities inc. Subscribers, Publishers, Timers, Services, Parameters. ...

ROS2 examples This example package is meant to explore the possibilities of ROS2 from the point of view of current ROS1 features and how the ROS1 feat

Libraries and examples to support Pimoroni Pico add-ons in C++ and MicroPython.

Pimoroni Pico Libraries and Examples Welcome to the brave new world of Pico! This repository contains the C/C++ and MicroPython libraries for our rang

Triton Python and C++ client libraries and example, and client examples for go, java and scala.

Triton Client Libraries and Examples To simplify communication with Triton, the Triton project provides several client libraries and examples of how t

Examples for using ONNX Runtime for machine learning inferencing.
Examples for using ONNX Runtime for machine learning inferencing.

Examples for using ONNX Runtime for machine learning inferencing.

Model synthesis is a technique for generating 2D and 3D shapes from examples.
Model synthesis is a technique for generating 2D and 3D shapes from examples.

Model Synthesis Model synthesis is a technique for generating 2D and 3D shapes from examples. It is inspired by texture synthesis. Model synthesis was

Small beginners C program examples.
Small beginners C program examples.

Small beginner C programs.

ESP32 S2 USB host with examples.

This new USB host library based is based on changed and hopefully somehow final API from espressif. The idea is to make this library usable with esp-i

Educational material and examples for those interested in learning the C programming language

Learn C Educational material and examples for those interested in learning the C programming language Files: examples.c Various examples of programs w

Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature

About This repository contains: Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature Public set o

Examples and test programs I made while learning the DPDK.

The DPDK Examples (WIP) Description A small repository I will be using to store my progress and test programs from the DPDK, a kernel bypass library v

Voicemeeter Remote API + Source Code Examples

Voicemeeter-SDK Voicemeeter Remote API + Source Code Examples Voicemeeter Remote API provides a set of functions to control Voicemeeter parameters, to

Examples for the "Introduction to programming" course given by me and @bzareva @ Faculty of Mathematics and Informatics, Sofia University (2021/22)

Теми от практикумите по "Увод в програмирането", зимен семестър 2021/2022, спец. "Информатика", група 5 Тема 1 (04.10.2021) : Променливи. Типове проме

Official examples and tools from the JACK project

JACK example tools This repository holds the official JACK example clients and tools, which have been tracked in the example-clients and tools reposit

PicoSystem libraries and examples.

PicoSystem libraries and examples PicoSystem is a pocket sized handheld games console, built around Raspberry Pi's RP2040 chip (that's the little fell

Examples of C extensions in Ruby gems

Ruby C Extensions, Explained Background How To Use This Repository Strategies Strategy 0, "isolated" Strategy 1, "system" Strategy 2a, "packaged_sourc

OTUS C++ course demo day examples

coroutines-epoll-example OTUS C++ course demo day examples Инструкция по сборке Необходимы следующие версии компонентов g++11 cmake = 3.10 git clone

Raspberry Pi Pico SDK Examples

Raspberry Pi Pico SDK Examples Getting started See Getting Started with the Raspberry Pi Pico and the README in the pico-sdk for information on gettin

A repo containing examples of embedded systems based on the STM32 micro-controller.
A repo containing examples of embedded systems based on the STM32 micro-controller.

STM32 Embedded Development A repo containing examples of embedded systems based on the STM32 micro-controller. I use a Nucleo-F446RE and the STM32Cube

The repository contains some examples of pre-trained SNN (Spiking Neural Network) models.

About the Project The repository contains some examples of pre-trained SNN (Spiking Neural Network) models. The models were trained using the MM-BP tr

Comments
  • The commands shown on https://github.com/build2/cxx20-modules-examples causes compile errors

    The commands shown on https://github.com/build2/cxx20-modules-examples causes compile errors

    The following (as posted on https://github.com/build2/cxx20-modules-examples) causes compile errors with either g++ version 11 or version 12. build2 was reinstalled after changing g++ version.

    git clone https://github.com/build2/cxx20-modules-examples.git
    cd cxx20-modules-examples
    
    bdep init -C @gcc cc config.cxx=g++ config.cxx.translate_include=all-importable
    bdep update @gcc
    

    $ lsb_release -a Ubuntu 22.04.1 LTS

    $ g++ --version g++ (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0

    $ bdep --version bdep 0.15.0 libbpkg 0.15.0 libbutl 0.15.0

    $ git clone https://github.com/build2/cxx20-modules-examples $ cd cxx20-modules-examples/ $ bdep init -C @gcc cc config.cxx=g++ config.cxx.translate_include=all-importable $ bdep update @gcc

    ...

    In module imported at /home/xxxx/cxx20-modules-examples/hello-library-header/libhello-header/tests/basics/driver.cxx:7:1: /home/xxxx/cxx20-modules-examples/hello-library-header/libhello-header/libhello/hello.hxx: error: import ‘/usr/include/c++/12/string_view’ has CRC mismatch In module imported at /home/xxxx/cxx20-modules-examples/hello-library-header/libhello-header/libhello/hello.hxx:8:1, of module /home/xxxx/cxx20-modules-examples/hello-library-header/libhello-header/libhello/hello.hxx, imported at /home/xxxx/tmp/junk-dir/cxx20-modules-examples/hello-library-header/libhello-header/tests/basics/driver.cxx:7: /home/xxxx/cxx20-modules-examples/hello-library-header/libhello-header/libhello/check.hxx: error: import ‘/usr/include/c++/12/string_view’ has CRC mismatch

    opened by JungHong 6
Owner
The build2 project
Cross-platform toolchain for building and packaging C/C++ code
The build2 project
Examples for using ONNX Runtime for machine learning inferencing.

Examples for using ONNX Runtime for machine learning inferencing.

Microsoft 394 Jan 3, 2023
PicoSystem libraries and examples.

PicoSystem libraries and examples PicoSystem is a pocket sized handheld games console, built around Raspberry Pi's RP2040 chip (that's the little fell

Pimoroni Ltd 83 Jan 3, 2023
Examples to help you programming the MSP430FR2433 from Texas Instruments.

MSP430FR2433 examples Examples to help you programming the MSP430FR2433 from Texas Instruments. I wrote this code quite a few years ago when the code

Juan Sandubete 2 Feb 2, 2022
Making Type Info Library (TIL) file for Apache modules

Creating TIL files for IDA Intro Creating a Type Information Library makes it easier to reverse engineer binaries by providing IDA with detailed and a

Raphaël Rigo 42 Nov 22, 2022
Open source modules to interface Metavision Intelligence Suite with event-based vision hardware equipment

Metavision: installation from source This page describes how to compile and install the OpenEB codebase. For more information, refer to our online doc

PROPHESEE 106 Dec 27, 2022
UE4 Plugin to execute trained PyTorch modules

SimplePyTorch UE4 Plugin to execute trained PyTorch modules ------- Packaging ------- Download PyTorch C++ distributions: https://pytorch.org/cppdocs/

null 50 Dec 6, 2022
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.

Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch Copyright 2006-2020 Ko van der Sloot, Maarten van Gompel, Antal van den

Language Machines 70 Dec 14, 2022
Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package.

Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch Copyright 2006-2020 Ko van der Sloot, Maarten van Gompel, Antal van den

Language Machines 70 Dec 14, 2022
This the contains the test examples and validator tool for the ISPD2021 Wafer-Scale Physics Modeling contest.

This readme documents information regarding the validator/scorer which will be used for the 2021 ISPD Contest problem: Wafer-Scale Physics Modelling

Cerebras 16 Aug 22, 2022
Basic eBPF examples in Golang using libbpfgo

libbpfgo-beginners Basic eBPF examples in Golang using libbpfgo. Accompanying slides from my talk at GOTOpia 2021 called Beginner's Guide to eBPF Prog

Liz Rice 166 Dec 28, 2022