xo-unit: tidy: quantity2_concept.hpp -> quantity_concept.hpp
This commit is contained in:
parent
6508fd5dc2
commit
1729ce06fc
2 changed files with 1 additions and 1 deletions
26
include/xo/unit/quantity_concept.hpp
Normal file
26
include/xo/unit/quantity_concept.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/** @file quantity2_concept.hpp **/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "unit_concept.hpp"
|
||||
#include "numeric_concept.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace qty {
|
||||
template <typename Quantity>
|
||||
concept quantity_concept = requires(Quantity qty, typename Quantity::repr_type repr)
|
||||
{
|
||||
typename Quantity::unit_type;
|
||||
typename Quantity::repr_type;
|
||||
|
||||
//{ Quantity::multiply(qty, qty) };
|
||||
|
||||
{ qty.scale() } -> std::same_as<const typename Quantity::repr_type &>;
|
||||
{ qty.unit() } -> std::same_as<const typename Quantity::unit_type &>;
|
||||
//{ Quantity::unit_cstr() } -> std::same_as<char const *>;
|
||||
//{ Quantity::unit_quantity() } -> std::same_as<Quantity>;
|
||||
//{ Quantity::promote(repr) } -> std::same_as<Quantity>;
|
||||
} && (true //unit_concept<typename Quantity::unit_type>
|
||||
&& numeric_concept<typename Quantity::repr_type>);
|
||||
} /*namespace qty*/
|
||||
} /*namespace xo*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue