"Shadows template parm" error under gcc 3.4.2

Joined
Oct 20, 2007
Messages
1
Reaction score
0
The following code compiles perfectly under the MS compiler, but fails miserably under the gcc 3.4.2 compiler with the error message "shadows template parm" for lines 03 and 18 (and also 04 and 19). Can someone please tell me what is gcc complaining about, because as far as I can see this is fully conformant code.

01: template
02: <
03: class T,
04: template<class C> class Policy
05: >
06: class CTest : public Policy<T>
07: {
08: public:
09: CTest() { }
10: virtual ~CTest() { }
11:
12: protected:
13: static T* m_var;
14: };
15:
16: template
17: <
18: class T,
19: template<class C> class Policy
20: >
21: T* CTest<T, Policy>::m_var = NULL;
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top