
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? WinXP, mingw 3.3.1 Regards, Janusz

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

Michael Glassford wrote:
Janusz Piwowarski wrote:
[...] 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 [...] 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?
I found source of this problem - latest changes in boost/function/function_base.hpp. Compiler try to instatiate template from line 533: template<typename Functor> BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(const function_base& f, Functor g) { if (const Functor* fp = f.template target<Functor>()) return function_equal(*fp, g); else return false; } Is this intentional? With named enum library compiles successful. Regards, Janusz

Janusz Piwowarski wrote: [snip previous original & replies]
I found source of this problem - latest changes in boost/function/function_base.hpp. Compiler try to instatiate template from line 533:
template<typename Functor> BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(const function_base& f, Functor g) { if (const Functor* fp = f.template target<Functor>()) return function_equal(*fp, g); else return false; }
Is this intentional?
I'm not the right person to answer this, but...
With named enum library compiles successful.
I'll gladly change the enum definition to be named. Mike

On Tuesday 22 June 2004 4:31 pm, Michael Glassford wrote:
Janusz Piwowarski wrote:
[snip previous original & replies]
I found source of this problem - latest changes in boost/function/function_base.hpp. Compiler try to instatiate template from line 533:
template<typename Functor> BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(const function_base& f, Functor g) { if (const Functor* fp = f.template target<Functor>()) return function_equal(*fp, g); else return false; }
Is this intentional?
I'm not the right person to answer this, but...
I should be the right person... it looks like a GCC bug.
With named enum library compiles successful.
I'll gladly change the enum definition to be named.
You shouldn't need to do this; it'll be fixed or worked around in Function. Doug
participants (3)
-
Doug Gregor
-
Janusz Piwowarski
-
Michael Glassford