xo-umbrella2/xo-unit/include/xo/unit/scaled_unit_concept.hpp
Roland Conybeare 60f796b770 git subrepo clone git@github.com:Rconybea/xo-unit.git xo-unit
subrepo:
  subdir:   "xo-unit"
  merged:   "f1e698bf"
upstream:
  origin:   "git@github.com:Rconybea/xo-unit.git"
  branch:   "main"
  commit:   "f1e698bf"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:22:52 -04: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 **/