
Janusz Piwowarski wrote:
Hello.
After latest cvs update, i've got errors like:
gcc-C++-action bin\boost\libs\thread\build\boost_thread.dll\mingw\debug\threading-multi\con dition.obj In file included from d:/sources/boost/libs/thread/src/condition.cpp:18: d:/sources/boost/libs/thread/src/timeconv.inl: In function `void <unnamed>::to_time(int, boost::xtime&)': d:/sources/boost/libs/thread/src/timeconv.inl:24: error: template-argument ` boost::<anonymous enum>' uses anonymous type d:/sources/boost/libs/thread/src/timeconv.inl: In function `void <unnamed>::to_duration(boost::xtime, int&)': d:/sources/boost/libs/thread/src/timeconv.inl:92: error: template-argument ` boost::<anonymous enum>' uses anonymous type d:/sources/boost/libs/thread/src/timeconv.inl: In function `void <unnamed>::to_microduration(const boost::xtime&, int&)': d:/sources/boost/libs/thread/src/timeconv.inl:114: error: template-argument ` boost::<anonymous enum>' uses anonymous type
"g++" -c -Wall -ftemplate-depth-100 -DBOOST_THREAD_BUILD_DLL=1 -g -O0 -f no-inline -mthreads -mthreads -mno-cygwin -I"bin\boost\libs\thread\build" -I"d:\sources\boost" -o "bin\boost\libs\thread\build\boost_thread.dll\mingw\debug\threading-multi\co ndition.obj" "d:\sources\boost\libs\thread\build\../src/condition.cpp"
Error lines in timeconv.inl file contains:
assert(res == boost::TIME_UTC)
where res is int, and boost::TIME_UTC is enum. When i changed it to
assert(res == static_cast<int>(boost::TIME_UTC));
it starts to compile. But I don't understand what's happend, there aren't changes in boost::thread. Any ideas?
As you indicate, the definition of the enum and the actual assertions haven't changed in a very long time, so they likely aren't the problem. Perhaps the compiler configuration or the definition of assert itself changed? I'm not familiar with the compiler, but the error
d:/sources/boost/libs/thread/src/timeconv.inl:24: error: template-argument ` boost::<anonymous enum>' uses anonymous type
implies a template-based implementation of assert which doesn't like the fact that the enumeration has no name. Have you tried giving it a name to see what effect that has? Mike