From 6b53abd6b477a0fd67f8cbace415eda5ff90e39b Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 16 Mar 2020 14:11:50 +1100 Subject: [PATCH] concepts: move std wrappers into one group --- concepts.hpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/concepts.hpp b/concepts.hpp index f5476e1b..40b02fb7 100644 --- a/concepts.hpp +++ b/concepts.hpp @@ -246,6 +246,26 @@ namespace cruft::concepts { } +/////////////////////////////////////////////////////////////////////////////// +// Trivial wrappers around traits +namespace cruft::concepts { + template + concept arithmetic = std::is_arithmetic_v; + + template + concept scalar = std::is_scalar_v; + + template + concept enumeration = std::is_enum_v; + + template + concept pointer = std::is_pointer_v; + + template + concept reference = std::is_reference_v; +} + + /////////////////////////////////////////////////////////////////////////////// // Some handy non-standard concepts #include @@ -268,14 +288,6 @@ namespace cruft::concepts { }; - template - concept arithmetic = std::is_arithmetic_v; - - template - concept scalar = std::is_scalar_v; - - template - concept enumeration = std::is_enum_v; /// A type that supports arithmetic operators.