incompatibility between g++ and vc++

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

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux