Skip to content

Commit c432d29

Browse files
authored
Workaround MSVC 16.20 bug. (#111)
Fixes #92.
1 parent 61a4b79 commit c432d29

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/type_safe/reference.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class function_ref<Return(Args...)>
568568
/// \exclude
569569
template <typename Return2, typename... Args2>
570570
function_ref(Return2 (*fptr)(Args2...),
571-
typename detail::enable_matching_function<decltype(fptr), Return, Args...>::type
571+
typename detail::enable_matching_function<Return2(*)(Args2...), Return, Args...>::type
572572
= 0)
573573
: function_ref(detail::matching_function_pointer_tag{}, fptr)
574574
{}
@@ -617,7 +617,8 @@ class function_ref<Return(Args...)>
617617
/// std::string`, even though such a conversion would be ill-formed otherwise. \param 1 \exclude
618618
template <typename Return2, typename... Args2>
619619
explicit function_ref(const function_ref<Return2(Args2...)>& other,
620-
detail::enable_matching_function<decltype(other), Return2, Args2...> = 0)
620+
detail::enable_matching_function<const function_ref<Return2(Args2...)>&,
621+
Return2, Args2...> = 0)
621622
: storage_(other.storage_), cb_(other.cb_)
622623
{}
623624

0 commit comments

Comments
 (0)