xo-umbrella2/xo-unit/include/xo/unit/scaled_unit_concept.hpp
Roland Conybeare d1fa15f248 Add 'xo-unit/' from commit 'b531e382c2'
git-subtree-dir: xo-unit
git-subtree-mainline: e9ee6992ca
git-subtree-split: b531e382c2
2025-05-10 21:29:43 -05:00

23 lines
580 B
C++

/** @file scaled_unit_concept.hpp **/
#pragma once
#include <concepts>
namespace xo {
namespace qty {
template <typename ScaledUnit>
concept scaled_unit_concept = requires(ScaledUnit su)
{
typename ScaledUnit::ratio_int_type;
{ su.is_scaled_unit_type() } -> std::same_as<bool>;
{ su.is_natural() } -> std::same_as<bool>;
{ su.is_dimensionless() } -> std::same_as<bool>;
} && ScaledUnit::is_scaled_unit_type_v;
} /*namespace qty*/
} /*namespace xo*/
/** end scaled_unit_concept.hpp **/