This is the mail archive of the gcc-help@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]

incompatibility between g++ and vc++


Hello,

one of my friend is writing a c++ program and compile it with vc++ on
windows. He has no compilation error.

I wanted to test it on linux, but g++ report an error.

Here is a part of the source code : 

template <class Clock> class timer : boost::noncopyable
{

  static Clock const clock_;   //Clock instance

  // methods

  ...


};

//instantation of the clock_ static member
template <class Clock>
Clock const timer<Clock>::clock_;


And g++ reports this error:
                               
l98: uninitialized const                                                        
`avs::timing::timer<avs::timing::ThreadClock>::clock_' 

I have tried to understand why g++ reduses to initialize clock_, without
success.

Does someone know where (what) is the error ? If you want more code, tell
me.

Thank you !

Vincent TORRI



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