Created on 2002-01-30.00:00:00 last changed 197 months ago
[Voted into WP at April 2003 meeting.]
Notes from the 4/02 meeting:
This is resolved by the proposed changes for issue 323.
The syntax for "export" permits it only on template declarations. Clause 13 [temp] paragraph 6 further restricts "export" to appear only on namespace scope declarations. This means that you can't export a member template of a non-template class, as in:
class A { template <class T> void f(T); };You can, of course, put export on the definition:
export template <class T> void A<T>::f(T){}but in order for the template to be used from other translation units (the whole point of export) the declaration in the other translation unit must also be declared export.
There is also the issue of whether or not we should permit this usage:
export struct A { template <class T> void f(T); };My initial reaction is to retain this prohibition as all current uses of "export" are preceding the "template" keyword.
If we eliminate the requirement that "export" precede "template" there is a similar issue regarding this case, which is currently prohibited:
template <class T> struct B { export void f(); };My preference is still to permit only "export template".
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | messages: + msg870 |
2003-04-25 00:00:00 | admin | set | status: ready -> wp |
2002-11-08 00:00:00 | admin | set | status: review -> ready |
2002-05-10 00:00:00 | admin | set | messages: + msg631 |
2002-05-10 00:00:00 | admin | set | status: open -> review |
2002-01-30 00:00:00 | admin | create |