Topic: Member Template Functions
Author: afk@ElSegundoCA.ATTGIS.COM (Art Kaufmann)
Date: 1995/07/21 Raw View
This is in reference to the 28April95 CD:
Clause 14 [temp] para 7 describes the declaration and definition of
member templates but does not describe how these things are referenced.
I couldn't find anything on this in Clause 14, nor in Clause 5. Clause
22.1.2.2 [lib.conversions] does describe this by implication; the syntax
implied seems poor to me:
class X {
public:
template<class T> T a;
template<class U> U f1(void);
};
X x;
int z;
double y;
z = x.template a<int>; // reference to data member
y = x.template f1<double>(); // reference to member function
The template keyword and (especially) the space looks ugly to me.
Comments?
BTW: Can anyone point me to where this syntax is explicitly described in
the CD?
Cheers,
---
Art Kaufmann |
afk@ElSegundoCA.ATTGIS.COM |
--------------------------------------------------------------------------------
"... and should anyone actually read this drivel, any knowlege of your actions
will be denied by AT&T Global Information Solutions"