Cpp2 introduces a consistent, context-free syntax for C++ that simplifies code and enhances safety by default. It supports modern C++ features like contracts, pattern matching, and automatic move from last use, aiming for simplicity through general defaults. Cppfront, the first compiler for Cpp2, ensures seamless interoperability with existing C++ code and the standard library, generating portable C++20 code. It also facilitates order-independent code and direct integration with existing tools.

7m read timeFrom hsutter.github.io
Post cover image
Table of contents
A hello.cpp2 programBuilding hello.cpp2Building and running hello.cpp with any recent C++ compiler

Sort: