hyporo-cpp/source/hpr/math/integer/size.hpp

22 lines
464 B
C++
Raw Permalink Normal View History

2023-03-13 22:27:09 +05:00
#pragma once
#include <type_traits>
namespace hpr
{
using Size = std::size_t;
// type traits
template <typename Type>
struct is_size : public std::integral_constant<bool, std::is_integral<Type>::value && std::is_unsigned<Type>::value> {};
// concepts
template <typename Type>
concept IsSize = is_size<Type>::value || std::convertible_to<Type, Size>;
//using Size = typename IsSize<std::size_t>::type;
2023-01-11 14:46:49 +05:00
}