cpdocs-generated-example API documentation
Project documentation Docs

File: _generated/include/acme/status.hpp

Generated by the build; not part of the repository.

1// Generated by cmake/generate-status.cmake from data/status-codes.txt; do not edit.2#pragma once3 4#include <string_view>5 6namespace acme {7 8/// The outcome of an acme operation, one enumerator per row of the status table.9enum class status : int {10    /// The operation succeeded.11    ok = 0,12    /// The result does not fit into the result type.13    overflow = 1,14    /// An argument that must not be negative was negative.15    negative = 2,16};17 18/// The name of a status code, as written in the status table.19constexpr std::string_view name(status code) noexcept {20    switch (code) {21    case status::ok:22        return "ok";23    case status::overflow:24        return "overflow";25    case status::negative:26        return "negative";27    }28    return "unknown";29}30 31} // namespace acme