intial commit
This commit is contained in:
48
source/mijin/util/concepts.hpp
Normal file
48
source/mijin/util/concepts.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(MIJIN_UTIL_CONCEPTS_HPP_INCLUDED)
|
||||
#define MIJIN_UTIL_CONCEPTS_HPP_INCLUDED 1
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace mijin
|
||||
{
|
||||
|
||||
//
|
||||
// public defines
|
||||
//
|
||||
|
||||
//
|
||||
// public constants
|
||||
//
|
||||
|
||||
//
|
||||
// public types
|
||||
//
|
||||
|
||||
template<typename T>
|
||||
concept standard_type = std::is_standard_layout_v<T>;
|
||||
|
||||
template<typename T>
|
||||
concept trivial_type = std::is_trivial_v<T>;
|
||||
|
||||
template<typename T>
|
||||
concept enum_type = std::is_enum_v<T>;
|
||||
|
||||
template<typename T>
|
||||
concept arithmetic_type = std::is_arithmetic_v<T>;
|
||||
|
||||
template<typename T>
|
||||
concept pointer_type = std::is_pointer_v<T>;
|
||||
|
||||
template<typename T>
|
||||
concept reference_type = std::is_reference_v<T>;
|
||||
|
||||
//
|
||||
// public functions
|
||||
//
|
||||
|
||||
} // namespace mijin
|
||||
|
||||
#endif // !defined(MIJIN_UTIL_CONCEPTS_HPP_INCLUDED)
|
||||
Reference in New Issue
Block a user