This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
incompatibility between g++ and vc++
- From: Vincent Torri <torri at math dot u-strasbg dot fr>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 9 Jun 2004 11:06:40 +0200 (MEST)
- Subject: 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