[ox/model] Fix ModelTypeName_v to use requireModelTypeName
This commit is contained in:
parent
8e816a261f
commit
ba9e720f9f
6
deps/ox/src/ox/model/typenamecatcher.hpp
vendored
6
deps/ox/src/ox/model/typenamecatcher.hpp
vendored
@ -140,16 +140,16 @@ constexpr Str getModelTypeName() noexcept {
|
||||
return out;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename T, typename Str = const char*>
|
||||
[[nodiscard]]
|
||||
consteval auto requireModelTypeName() noexcept {
|
||||
constexpr auto name = getModelTypeName<T>();
|
||||
constexpr auto name = getModelTypeName<T, Str>();
|
||||
static_assert(ox::StringView{name}.len(), "Type lacks required TypeName");
|
||||
return name;
|
||||
}
|
||||
|
||||
template<typename T, typename Str = const char*>
|
||||
constexpr auto ModelTypeName_v = getModelTypeName<T, Str>();
|
||||
constexpr auto ModelTypeName_v = requireModelTypeName<T, Str>();
|
||||
|
||||
template<typename T, typename Str = const char*>
|
||||
constexpr auto ModelTypeVersion_v = requireModelTypeVersion<T>();
|
||||
|
Loading…
Reference in New Issue
Block a user