cpdocs-generated-example API documentation
Project documentation Docs

File: include/acme/core.hpp

1// --------------------------------------------------------------------------------------------------2// SPDX-License-Identifier: Apache-2.03// SPDX-FileCopyrightText: 2026 cpdocs developers4// --------------------------------------------------------------------------------------------------5#pragma once6 7// Both headers below exist only in the build directory: the build generates them.8#include <acme/status.hpp>9#include <acme/version.hpp>10 11/// Checked arithmetic on counters.12namespace acme {13 14/// Add two counters without wrapping around.15///16/// @param left   the first counter17/// @param right  the second counter18/// @param sum    receives the sum when the result is status::ok19/// @return status::ok, status::negative for a negative argument, or status::overflow20status add(int left, int right, int& sum) noexcept;21 22} // namespace acme