Skip to content

Commit

Permalink
chore: change template parameters of Require
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Oct 18, 2024
1 parent b72d6c3 commit d59645b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ll/api/base/TypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace ll::traits {

template <class T, template <class> class Z>
concept Require = Z<T>::value;
template <class T, template <class...> class Z, class... Ts>
concept Require = Z<T, Ts...>::value;

template <size_t N, class T, class... Ts>
struct get_type {
Expand Down
4 changes: 2 additions & 2 deletions src/ll/api/reflection/Serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inline Expected<J> serialize_impl(T&& obj, meta::PriorityTag<1>)
requires(Reflectable<std::remove_cvref_t<T>>);
template <class J, class T>
inline Expected<J> serialize_impl(T&& e, meta::PriorityTag<1>)
requires(concepts::Require<std::remove_cvref_t<T>, std::is_enum>);
requires(std::is_enum_v<std::remove_cvref_t<T>>);
template <class J, class T>
inline Expected<J> serialize_impl(T&& obj, meta::PriorityTag<0>)
requires(std::convertible_to<std::remove_cvref_t<T>, J>);
Expand Down Expand Up @@ -194,7 +194,7 @@ inline Expected<J> serialize_impl(T&& obj, meta::PriorityTag<1>)
}
template <class J, class T>
inline Expected<J> serialize_impl(T&& e, meta::PriorityTag<1>)
requires(concepts::Require<std::remove_cvref_t<T>, std::is_enum>)
requires(std::is_enum_v<std::remove_cvref_t<T>>)
{
return magic_enum::enum_name(std::forward<T>(e));
}
Expand Down

0 comments on commit d59645b

Please sign in to comment.