Boost.fusion 1.42 / Gcc 4.5: what is this error trying to tell me? (Works with Gcc 4.4)

Hi,
I have code that compiles OK with Gcc 4.4 but fails with 4.5 and I
cannot understand what the error I get from the compiler means. Maybe
someone here can give me a suggestion?
The error:
In file included from /usr/include/boost/fusion/algorithm/query/find.hpp:13:0,
from /usr/include/boost/fusion/sequence/intrinsic/has_key.hpp:12,
from /usr/include/boost/fusion/sequence/intrinsic.hpp:16,
from /usr/include/boost/fusion/sequence.hpp:12,
from ../../../library/../include/Danu/DanuModelObjects/User.hpp:11,
from ../../../library/../include/Danu/DanuViewObjects/UserViewObject.hpp:12,
from ../../../library/../include/Danu/DanuViewObjects/UserDialog.hpp:15,
from ../../../library/../include/Danu/DanuModelObjectsFactory/UserCreatorFunction.hpp:10,
from ../../../library/DanuModelObjectsFactory/UserCreatorFunction.cpp:7:
/usr/include/boost/fusion/iterator/key_of.hpp: In instantiation of 'boost::fusion::result_of::key_of
UserArgs; struct UserCreationArguments : public MOCFunctionParameter, public UserArgs ...
...
ModelObject* UserCreatorFunction::createObject( const MOCFunctionParameter* aMOCFunctionParameter /* = NULL */) const
{
...
if ( (arguments = dynamic_cast< UserCreator::UserCreationArguments* >(const_cast

On 06/03/11 10:01, Joost Kraaijeveld wrote:
Hi,
I have code that compiles OK with Gcc 4.4 but fails with 4.5 and I cannot understand what the error I get from the compiler means. Maybe someone here can give me a suggestion?
The error: ../../../library/DanuModelObjectsFactory/UserCreatorFunction.cpp:40:83: instantiated from here /usr/include/boost/fusion/iterator/key_of.hpp:38:9: error: invalid use of incomplete type 'struct boost::fusion::extension::key_of_implboost::fusion::non_fusion_tag' /usr/include/boost/fusion/iterator/key_of.hpp:20:16: error: declaration of 'struct boost::fusion::extension::key_of_implboost::fusion::non_fusion_tag'
The non_fusion_tag error here says you pass a type which is not a fusion sequence to key_of at line 40 of your code.
ObjectId& objectId = boost::fusion::at_key< UserCreator::objectId>(*arguments);<--!!!!!!!!
So here check if *arguments is really a fusion sequence.

Hi Joel, Thanks for replying so quick. On Sun, 2011-03-06 at 10:05 +0100, Joel Falcou wrote:
The error: ../../../library/DanuModelObjectsFactory/UserCreatorFunction.cpp:40:83: instantiated from here /usr/include/boost/fusion/iterator/key_of.hpp:38:9: error: invalid use of incomplete type 'struct boost::fusion::extension::key_of_implboost::fusion::non_fusion_tag' /usr/include/boost/fusion/iterator/key_of.hpp:20:16: error: declaration of 'struct boost::fusion::extension::key_of_implboost::fusion::non_fusion_tag'
The non_fusion_tag error here says you pass a type which is not a fusion sequence to key_of at line 40 of your code.
ObjectId& objectId = boost::fusion::at_key< UserCreator::objectId>(*arguments);<--!!!!!!!!
So here check if *arguments is really a fusion sequence.
"arguments" is a pointer to a struct which is publicly derived boost::fusion::map which is a fusion sequence according to the docs I believe (http://www.boost.org/doc/libs/1_42_0/libs/fusion/doc/html/fusion/container/m...) Your response however led to an experiment which shows that the error is in: ObjectId& objectId = boost::fusion::at_keyUserCreator::objectId(*arguments) as the other calls with boost::fusion::at_key (see the last code snippet) do not result in errors. Could the fact that the class ObjectId is publicly derived from std::vector< unsigned char> have anything to do with this? TIA -- Met vriendelijke groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl
participants (2)
-
Joel Falcou
-
Joost Kraaijeveld