diff --git a/TotalOrder.h b/TotalOrder.h new file mode 100644 index 0000000..e18f722 --- /dev/null +++ b/TotalOrder.h @@ -0,0 +1,27 @@ +static_assert( __cplusplus > 2020'00 ); + +#pragma once + +#include + +#include "Concepts.h" + +namespace Alepha::inline Cavorite ::detail:: total_order +{ + inline namespace exports + { + using TotalOrder= std::strong_ordering; + + template< typename T > + concept TotalOrderable= + requires( const T &lhs, const T &rhs ) + { + { lhs <=> rhs } -> SameAs< TotalOrder >; + }; + } +} + +namespace Alepha::Cavorite::inline exports::inline total_order +{ + using namespace detail::total_order::exports; +}