Function with parameter type that has a copy-constructor with non-const ref chosen?
- by Johannes Schaub - litb
Some time ago I was confused by the following behavior of some code when I wanted to write a is_callable<F, Args...> trait. Overload resolution won't call functions accepting arguments by non-const ref, right? Why doesn't it reject in the following because the constructor wants a Test&? I expected it to take f(int)!
struct Test {
…