9 #include "Mountain/core.hpp" 12 #include <type_traits> 34 template <
typename Base,
typename Derived>
35 constexpr bool_t
IsBaseOf = std::is_base_of_v<Base, Derived>;
40 template <
typename A,
typename B>
41 constexpr bool_t
IsSame = std::is_same_v<A, B>;
46 template <
typename T,
typename... Other>
47 constexpr bool_t
IsAny = (std::is_same_v<T, Other> || ...);
52 constexpr bool_t
IsArray = std::is_array_v<T>;
62 constexpr bool_t
IsClass = std::is_class_v<T>;
67 constexpr bool_t
IsEnum = std::is_enum_v<T>;
94 template <
bool_t Test>
95 using EnableIf = std::enable_if_t<Test>;
101 template <
typename T>
108 template <
typename T>
115 template <
typename T>
122 template <
typename T,
typename A>
123 constexpr bool_t IsStdVector<std::vector<T, A>> =
true;
129 template <
typename T,
typename... Args>
130 constexpr bool_t IsStdFunction<std::function<
T(Args...)>> =
true;
136 template <
typename T,
typename A>
137 constexpr bool_t IsStdMap<std::map<T, A>> =
true;
143 template <
typename T>
144 constexpr bool_t IsMountainList<List<T>> =
true;
151 template <
typename T>
152 constexpr bool_t IsMountainPointer<Pointer<T>> =
true;
168 template <
typename T>
169 constexpr bool_t
IsNativeType = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t, bool_t>;
184 template <
typename T>
185 constexpr bool_t
IsIntegralOrFloating = IsAny<T, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float_t, double_t>;
197 template <
typename T>
198 constexpr bool_t
IsMathType = IsAny<T, Vector2, Vector2i, Vector3, Vector4, Quaternion>;
207 template <
typename T>
210 template <Concepts::EnumT T>
211 using UnderlyingEnumType = std::underlying_type_t<T>;
213 template <Concepts::EnumT T>
214 using Flags = UnderlyingEnumType<T>;
Custom Mountain smart pointer. Represents both a std::shared_ptr and a std::weak_ptr.
Defines the Mountain::Concepts namespace which contains useful concepts used in the engine...
Contains all declarations of the Mountain Framework.