Use this file to discover all available pages before exploring further.
Because ASTD is header-only, installation is simply a matter of getting the astd/ directory onto your filesystem and telling your compiler where to find it. There are no libraries to link, no package manager to configure, and no generated files to maintain. The two sections below cover the two ways to obtain the headers: a GitHub Releases download (best for pinning a specific version) and a git clone (best for tracking the latest commits).
Add the umbrella include at the top of your source file and compile with the C++20 flag for your toolchain (see the Compiler flags section below).
#include "astd/astd.hpp"
1
Clone the repository
Run git clone to download the full repository, including the astd/ headers.
git clone https://github.com/X-ARTEMIS/ASTD
2
Copy the astd/ directory into your project
Copy the astd/ subdirectory from the cloned repo into the root of your own project.
cp -r ASTD/astd/ ./your-project/astd/
If you want to receive updates automatically, you can instead add ASTD as a git submodule so that git submodule update keeps the headers in sync with upstream.
ASTD uses std::lcm (from <numeric>) and std::chrono time-zone support, both of which require C++20. Set the appropriate flag for your toolchain:
GCC
Clang
MSVC
g++ -std=c++20 -I. main.cpp -o main
The -I. flag tells GCC to search the current directory for headers, so #include "astd/astd.hpp" resolves correctly when astd/ sits at the project root.
clang++ -std=c++20 -I. main.cpp -o main
Clang accepts the same -std=c++20 flag as GCC and the same -I include-path syntax.
cl /std:c++20 /I. main.cpp /Fe:main.exe
On MSVC the C++20 switch is /std:c++20. The /I. flag adds the current directory to the include search path. Time-zone database support also requires linking against windowsapp.lib on some MSVC configurations:
Compiling with C++17 or earlier will cause errors in both fraction.hpp (which uses std::lcm from <numeric>) and time.hpp (which uses std::chrono::current_zone()). Always ensure your project-wide C++ standard is set to C++20 or later.
Create a main.cpp at your project root with the following content and compile it. A successful build with no errors confirms that ASTD headers are found and that your compiler is in C++20 mode.