Language

C++

First appeared
1985
Paradigm
Multi-paradigm, compiled, statically typed
Toolchain
GCC 14.2 (g++, C++23)
Container image
debian:trixie-20261027-slim + g++-14 14.2.0-19

Bjarne Stroustrup started C++ at Bell Labs as “C with Classes”, and the first commercial release came in 1985. It keeps C’s speed and its direct access to memory and adds classes, templates, and a large standard library of containers and algorithms. Games, browsers, databases, and trading systems are written in it, and so are the engines under data science libraries such as TensorFlow, PyTorch, and XGBoost, none of which is installed here.

The implementations use C++23, compiled with g++ with every warning an error. The standard library brings std::vector, std::map, std::sort, and std::println, but no statistics and no matrices, so the methods are written out.

Quirks

Concepts in C++

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every C++ example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language cpp