On Oct 9, 5:46 pm, "Johannes Schaub (litb)" <schaub-johan...@web.de>
wrote:
Johannes Schaub (litb) wrote:
[...]
I just see that I miss some very important insight
throughout the whole discussion. The following *is* valid
C++03:
struct A {
template<typename T>
A(A const&);
};
So, if "A non-template" would be missing, then this would
inhibit the implicitly declared copy constructor too, and the
following will be ill- formed:
A a;
A b = a; // no matching constructor!
Why would that be ill formed? There is a matching constructor.
Consider, for example:
struct A { template<typename T> A(A&); };
A const a;
A b(a);
If the template were considered a copy constructor, this would
be ill formed (since there would be no matching constructor).
But there would be no problem with your example, since an
instantiation of the template would be used to copy.