4 ms·
Could you show an example for what you meant in #6?
by nikital 12y ago
Could you show an example for what you meant in #6?
- nly 12y agoSure. struct A { A (A const&); // copy constructor; A (A&&); // move constructor template <typename T> A (T&&); // template constructor }; int main() { A a1; A a2(a1); // calls the template constructor because a1 is an lvalue }