Created on 2009-10-27.00:00:00 last changed 179 months ago
[Voted into WP at March, 2010 meeting.]
Proposed resolution (February, 2010):
Change the example in 13.9.3 [temp.explicit] paragraph 5 as follows:
namespace N { template<class T> class Y { void mf() { } }; } template class Y<int>; // error: class template Y not visible // in the global namespace using N::Y;template class Y<int>; // OK: explicit instantiation in namespace Ntemplate class Y<int>; // error: explicit instantiation outside of the // namespace of the template template class N::Y<char*>; // OK: explicit instantiation in namespace N template void N::Y<double>::mf(); // OK: explicit instantiation // in namespace N
13.9.3 [temp.explicit] paragraph 5 has an example that reads, in significant part,
namespace N { template<class T> class Y { void mf() { } }; } using N::Y; template class Y<int>; // OK: explicit instantiation in namespace N
In fact, paragraph 2 requires that an explicit instantiation with an unqualified name must appear in the same namespace in which the template was declared, so the example is ill-formed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-03-29 00:00:00 | admin | set | messages: + msg2740 |
2010-03-29 00:00:00 | admin | set | status: tentatively ready -> cd2 |
2010-02-16 00:00:00 | admin | set | messages: + msg2512 |
2010-02-16 00:00:00 | admin | set | status: open -> tentatively ready |
2009-10-27 00:00:00 | admin | create |