Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename ReturnT, typename... ParamT>
- void foo(std::function<ReturnT(ParamT...)> callback)
- {}
- template<typename ReturnT, typename ParamT>
- void bar(std::function<ReturnT(ParamT)> callback)
- {}
- main()
- {
- foo<int, int>([](int x){ return x; }); // no instance of function
- // template matches argument list
- bar<int, int>([](int x){ return x; }); // OK
- }
Add Comment
Please, Sign In to add comment