Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/X-ARTEMIS/ASTD/llms.txt

Use this file to discover all available pages before exploring further.

ASTD (Artemis Standard Library) is a lightweight, header-only C++ library designed for use across Artemis projects. It extends the C++ standard library with practical utilities for math operations, fraction arithmetic, and system time access — all accessible through a single convenience include with no build step required.

Installation

Get ASTD into your project in two steps — no package manager required.

Quickstart

Write your first program with ASTD’s math and time utilities.

API Reference

Explore all public functions, classes, and operators in ASTD.

Versioning

Understand ASTD’s semantic versioning policy and release cadence.

What’s in ASTD

ASTD ships three modules, all included via the umbrella header astd/astd.hpp:

Math

power(), square(), and getNumType() for common numeric operations.

Fraction

A templated fraction<T,U> class with full arithmetic operator support.

Time

getSystemTime() and getSystemTrimmedTime() via std::chrono.

Quick Look

astd_demo.cpp
#include "astd/astd.hpp"
#include <iostream>

int main() {
    // Math
    std::cout << power(2, 10) << "\n";        // 1024
    std::cout << square(7) << "\n";           // 49
    std::cout << getNumType(4) << "\n";       // true (even)

    // Fraction arithmetic
    fraction<int, int> a(1, 3);
    fraction<int, int> b(1, 6);
    a += b;
    std::cout << a << "\n";                   // 1/2 (LCM normalised)
    std::cout << a.fractionToDecimal() << "\n"; // 0.5

    // Time
    auto now = astd::getSystemTime();
    auto local = astd::getSystemTime(true);   // local timezone
}
ASTD requires C++20 or later. The fraction class and time module depend on <numeric> (for std::lcm) and <chrono> respectively, both part of the C++20 standard.

Build docs developers (and LLMs) love