libcruft-util/cruft/util/concepts/traits.hpp

24 lines
554 B
C++
Raw Normal View History

#pragma once
#include <type_traits>
///////////////////////////////////////////////////////////////////////////////
// Trivial wrappers around traits
namespace cruft::concepts::traits {
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>;
}