prog.cpp: In instantiation of ‘struct Test<int*&, std::function<void(int*)>&>’:
prog.cpp:50:20: required from here
prog.cpp:18:2: error: ‘Test<T, F>::Test(const T&, const F&) [with T = int*&; F = std::function<void(int*)>&]’ cannot be overloaded
Test(T const& resource, F const& deleter)
^
prog.cpp:14:2: error: with ‘Test<T, F>::Test(T&&, F&&) [with T = int*&; F = std::function<void(int*)>&]’
Test(T&& resource, F&& deleter)
^
prog.cpp: In instantiation of ‘Test<T, F> test(T&&, F&&) [with T = int*&; F = std::function<void(int*)>&]’:
prog.cpp:50:20: required from here
prog.cpp:29:36: error: no matching function for call to ‘Test<int*&, std::function<void(int*)>&>::Test(std::remove_reference<int*&>::type, std::remove_reference<std::function<void(int*)>&>::type)’
return Test<T, F>(move(t), move(f));
^
prog.cpp:29:36: note: candidates are:
prog.cpp:14:2: note: Test<T, F>::Test(T&&, F&&) [with T = int*&; F = std::function<void(int*)>&]
Test(T&& resource, F&& deleter)
^
prog.cpp:14:2: note: no known conversion for argument 1 from ‘std::remove_reference<int*&>::type {aka int*}’ to ‘int*&’
prog.cpp:9:8: note: constexpr Test<int*&, std::function<void(int*)>&>::Test(const Test<int*&, std::function<void(int*)>&>&)
struct Test
^
prog.cpp:9:8: note: candidate expects 1 argument, 2 provided
prog.cpp:9:8: note: constexpr Test<int*&, std::function<void(int*)>&>::Test(Test<int*&, std::function<void(int*)>&>&&)
prog.cpp:9:8: note: candidate expects 1 argument, 2 provided
prog.cpp: In function ‘Test<T, F> test(T&&, F&&) [with T = int*&; F = std::function<void(int*)>&]’:
prog.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^