help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

macro problem(re-mailing with sample code), compiles fine with 2.95.1, f


From: whizz_kid
Subject: macro problem(re-mailing with sample code), compiles fine with 2.95.1, fails with 3.4.4
Date: 8 Mar 2006 20:56:24 -0800
User-agent: G2/0.2

Hi all,

I am having some problem compiling the following code in gcc 3.4.4

File: Class1.C
==========>

 #include "Logging.h"

 template <class T>
 class Class1 {
     public:
     static const char tracing_name[];
     private:
     int a;
     T c;
 };
 class SpecializedClass {
     int b;
 };

 TRACE_CLASS_MACRO(Class1<SpecializedClass>);

<=========


File: Logging.h
===========>

#define TRACE_CLASS_MACRO(class_id) \
    const char class_id::tracing_name[] = #class_id

<===========

The above code compiles fine with 2.95.1
compiling with 3.4.4 results in the following error messages:

error: too few template-parameter-lists
error: expected `,' or `;' before '=' token


Can anyone please tell me whats happenning here....??

Thanking you in anticiaption... 
With regards, 
Raj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]