1
0
forked from Alepha/Alepha

Add a total-order shim header.

Mathematical purism.
This commit is contained in:
2023-10-10 02:24:18 -04:00
parent bb53f18dfd
commit 83f693de53

27
TotalOrder.h Normal file
View File

@ -0,0 +1,27 @@
static_assert( __cplusplus > 2020'00 );
#pragma once
#include <compare>
#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;
}