diff --git a/include/ylt/struct_pack/reflection.hpp b/include/ylt/struct_pack/reflection.hpp index d8e1e0f99d..7b888555a5 100644 --- a/include/ylt/struct_pack/reflection.hpp +++ b/include/ylt/struct_pack/reflection.hpp @@ -199,11 +199,21 @@ struct constant_checker{}; template struct has_user_defined_id_ADL_impl : std::false_type {}; +#ifdef _MSC_VER +// FIXME: we can't check if it's compile-time calculated in msvc with C++17 +template +struct has_user_defined_id_ADL_impl< + T, std::void_t> + : std::true_type {}; +#else + template struct has_user_defined_id_ADL_impl< T, std::void_t>> : std::true_type {}; +#endif + template constexpr bool has_user_defined_id_ADL = has_user_defined_id_ADL_impl::value;