I think this code should print "hit" but it doesn't. If you comment out line 6 (the template line), it prints "hit."
#include <iostream>
struct test {
test() {}
template<typename = typename std::enable_if<true>::type>
test(test const & other) {
std::cout << "hit";
}
};
int main()
{
test a;
test b(a);
}
The standard explicitly indicates this. What's the rationale?