concepts: move std wrappers into one group

This commit is contained in:
Danny Robson 2020-03-16 14:11:50 +11:00
parent 67a3e016e1
commit 6b53abd6b4

View File

@ -246,6 +246,26 @@ namespace cruft::concepts {
}
///////////////////////////////////////////////////////////////////////////////
// Trivial wrappers around traits
namespace cruft::concepts {
template <typename T>
concept arithmetic = std::is_arithmetic_v<T>;
template <typename T>
concept scalar = std::is_scalar_v<T>;
template <typename T>
concept enumeration = std::is_enum_v<T>;
template <typename T>
concept pointer = std::is_pointer_v<T>;
template <typename T>
concept reference = std::is_reference_v<T>;
}
///////////////////////////////////////////////////////////////////////////////
// Some handy non-standard concepts
#include <tuple>
@ -268,14 +288,6 @@ namespace cruft::concepts {
};
template <typename T>
concept arithmetic = std::is_arithmetic_v<T>;
template <typename T>
concept scalar = std::is_scalar_v<T>;
template <typename T>
concept enumeration = std::is_enum_v<T>;
/// A type that supports arithmetic operators.