This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58885] New: Template static variable linking issue!


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

            Bug ID: 58885
           Summary: Template static variable linking issue!
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vehbi.esref.bayraktar at gmail dot com

Created attachment 31090
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31090&action=edit
One header one cpp

Sending the code as is. Compile and see the following error first:

specializing member âVCL::CGEnum<int, Test_Enum>::msInstancesâ requires
âtemplate<>â syntax

Once i prefix the line with template<> , it starts compiling about
undefined reference to `VCL::CGEnum<int, Test_Enum>::msInstances'

Initial code works perfectly fine with VS2012.

Please have a look!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]