My Header file Interface.h has the following piece of code

template <class T>
class Interface {

...

protected:
   static const std::string cConfItem;
};


typedef Interface<FileXfer::iFileXfer>     InterfaceFileXfer;
============================================
In my source file Interface.cxx 

I have the following:

const string InterfaceFileXfer::cConfItem   = "Handler.FileXferH";

The above gets compiled without any errors on Sun Studio11.

But I get the following error when I compile using gcc (gcc-4.1.3-29 openSUSE
10.2)

Interface.cxx:31: error: too few template-parameter-lists

I don't know how should be the initialization for cConfItem like...

So I tried the following:

template <class T> const string Interface<FileXfer::iFileXfer>::cConfItem   =
"Handler.FileXferH";

But I got the following error:

internal compiler error: in import_export_decl, at cp/decl2.c:1715
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.opensuse.org> for instructions.
make: *** [Interface.o] Error 1


-- 
           Summary: internal compiler error: in import_export_decl, at
                    cp/decl2.c:1715
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: keelar at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34447

Reply via email to