Boost logo

Boost :

Subject: [boost] [function_types][fusion]
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-12-15 14:34:44


Hi,

This simple call results in errors.

       boost::fusion::fused<boost::factory<int*> >()
           (boost::fusion::vector0 ());

Errors in gcc 4.3.2:
/opt/i686-cross-gcc-boost_1_38_0/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/include/boost/fusion/functional/invocation/invoke.hpp:
In instantiation of
'boost::fusion::detail::invoke_impl<boost::factory<int*, int
boost::detail::none_helper::*, factory_alloc_for_pointee_and_deleter>,
boost::fusion::vector0, 0, true, true>':
/opt/i686-cross-gcc-boost_1_38_0/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/include/boost/fusion/functional/invocation/invoke.hpp:80:
error: invalid use of undefined type 'struct
boost::fusion::detail::invoke_mem_fn<boost::factory<int*, int
boost::detail::none_helper::*, factory_alloc_for_pointee_and_deleter>,
boost::fusion::vector0, 0, true>'
/opt/i686-cross-gcc-boost_1_38_0/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/usr/include/boost/fusion/functional/invocation/invoke.hpp:89:
error: declaration of 'struct
boost::fusion::detail::invoke_mem_fn<boost::factory<int*, int
boost::detail::none_helper::*, factory_alloc_for_pointee_and_deleter>,
boost::fusion::vector0, 0, true>'

This seems because CBI in invoke_impl is being defined as true.
And ft::is_callable_builtin<Function>::value is being true.
But Function is boost::factory<int*> and doesn't look like a callable-builtin.
If I force CBI to false, then it works.

Any help would be appreciated,

-- 
Felipe Magno de Almeida

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk