This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I have a template class defined as follows:
template<class T, int size, T *T::*link, unsigned long T::*Key>
class foo {
...
}
I have another class that has as a data member an instance
of the template class foo:
class bar{
public:
[snip ...]
bar *m_aa;
unsigned long m_bb;
static foo<Mstream, STREAMHASH, &bar::aa, &bar::bb> m_foo;
[snip ...]
}
egcs-1.1.2 running on Linux complains:
../bar.hxx:: incomplete type `bar' does not have member `m_aa'
../bar.hxx:: incomplete type `bar' does not have member `m_bb'
../bar.hxx:: template argument 3 is invalid
../bar.hxx:: template argument 4 is invalid
../bar.hxx:: warning: ANSI C++ forbids declaration `m_foo' with no type
A Unixware compiler does not complain as it seems to be able to figure
out that aa and bb are members of bar before bar's closing brace.
Any suggestions are appreciated.
Thanks,
Leslie Kuczynski