Commit 3818cec8 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

common.hpp: Fix signature_match_or_nullptr on MSVC

Since MSVC doesn't handle SFINAE, it will report a build error instead of failing gracefully and use the default case.
Instead, we provide an explicit specialization for std::nullptr_t, so that the compiler won't complain about nullptr not being convertible to a function
parent 89565db4
......@@ -81,12 +81,16 @@ namespace VLC
template <typename Func, typename Ret, typename... Args>
struct signature_match_or_nullptr : std::integral_constant<bool,
signature_match<Func, Ret, Args...>::value ||
std::is_same<Func, std::nullptr_t>::value
signature_match<Func, Ret, Args...>::value
>
{
};
template <typename Func>
struct signature_match_or_nullptr<nullptr_t, Func> : std::true_type
{
};
struct CallbackHandlerBase
{
virtual ~CallbackHandlerBase() = default;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment