Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Sep 18, 2023
1 parent e274d88 commit 3b8eb24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/ylt/struct_pack/reflection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,15 @@ struct has_user_defined_id_impl<
template <typename T>
constexpr bool has_user_defined_id = has_user_defined_id_impl<T>::value;

template <std::size_t sz>
struct constant_checker{};

template <typename T, typename = void>
struct has_user_defined_id_ADL_impl : std::false_type {};

template <typename T>
struct has_user_defined_id_ADL_impl<
T, std::void_t<std::integral_constant<std::size_t, struct_pack_id((T*)nullptr)>>>
T, std::void_t<decltype(constant_checker<struct_pack_id((T*)nullptr)>)>>
: std::true_type {};

template <typename T>
Expand Down

0 comments on commit 3b8eb24

Please sign in to comment.