Topic: Spelling of template parameter dependent names
Author: Gerd Moellmann <mmann@ibm.net>
Date: 1996/06/25 Raw View
I am wondering what role the spelling of a template parameter
dependent name has. Consider the following example.
class X {
template<template<class U> class T>
void f(T<int *> *p);
template<class T>
void g(Y<int *, T> *p); // Y some template class
template<template<class U> class T>
void h(T<int *>::Z *p);
};
typedef int *PI;
template<template<class U> class T>
void X::f(T<PI> *p) {...}
template<class T>
void g(Y<PI, T> *p) {...}
template<template<class U> class T>
void h(T<PI>::Z *p);
Would an implementation be expected to find out that `T<int*>' and
`T<PI>', `Y<PI, T>' and `Y<int *, T>', and `T<int*>::Z' and `T<PI>::Z'
mean the same type at the time the definitions of `f', `g' and `h' are
parsed? Or would it be delayed until instantiation time?
--
Gerd Moellmann, Altenbergstr. 6, D-40235 Duesseldorf, Germany
Software Development & Consulting
Internet: mmann@ibm.net / CIS: 100025,3303 / Phone: +49 211 666 881
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]