Subject: Re: [boost] [function] Using boost::function when rtti is not available
From: David Genest (david.genest_at_[hidden])
Date: 2009-11-26 14:51:15
> hope it helps...:
I am on xbox 360 with visual 2005, PS3 with SNSystems SNC compiler and gcc compiler v 4.1.1.
I have tried your implementation and compilation fails at a STATIC_ASSERT:
BOOST_STATIC_ASSERT( is_stateless<base_empty_handler>::value );
A simple declaration of boost::function<void ()> f; will create this error.
A similar assert happens with SN systems compiler for the PS3.
When I use gcc, there are a slew of errors mostly pertaining to declaration order in function_template.hpp. I am not very familiar with this issue, but have tried to move code around, and defining functions out of class scope. Some errors go away, but there are a lot of compiler problems at least on my machine.
Here is the error on xbox 360:
1>boost-1.40.0\boost/function/function_template.hpp(183) : error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'
1> boost-1.40.0\boost/function/function_template.hpp(641) : see reference to class template instantiation 'boost::function0<R,PolicyList>' being compiled
1> myFile.cpp(64) : see reference to class template instantiation 'boost::function<Signature>' being compiled
1> Signature=void (void)
There were also some trouble when compiling templates that end in ">>" which AFAIK is not fixed on my version of gcc.
Do you know if your changes made boost.function less robust to older compilers ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk