Boost logo

Boost :

Subject: Re: [boost] [type_erasure] compile error with gcc 4.8
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2013-05-27 15:35:46


>
> I only have gcc 4.7
>
> In Christ,
> Steven Watanabe

With 4.8.0 I get this, in case it helps.

Thanks,
Christophe

In file included from any.cpp:8:0:
any.cpp: In instantiation of 'typename boost::type_erasure::rebind_any<Base,
R>::type boost::type_erasure::concept_interface<has_post<R(A ...), T>, Base,
typename boost::enable_if<boost::type_erasure::detail::should_be_const<T,
Base>, typename boost::remove_const<T>::type>::type, Enable>::post(typename
boost::type_erasure::as_param<Base, A>::type ...) const [with R = void; A =
{boost::function<void()>&&}; T = const boost::type_erasure::_self; Base =
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept> >,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>; Enable = void; typename
boost::enable_if<boost::type_erasure::detail::should_be_const<T, Base>,
typename boost::remove_const<T>::type>::type = boost::type_erasure::_self;
typename boost::type_erasure::rebind_any<Base, R>::type = void]':
any.cpp:37:24: required from here
/data/boost_1_52_0/boost/type_erasure/member.hpp:194:66: error: no matching
function for call to 'call(has_post<void(boost::function<void()>&&), const
boost::type_erasure::_self>, const
boost::type_erasure::concept_interface<has_post<void(boost::function<void()>&&),
const boost::type_erasure::_self>,
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept> >,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>&,
boost::function<void()>)'
                 *this BOOST_TYPE_ERASURE_MEMBER_FORWARD_REBIND(N));
\
                                                                  ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:239:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_II'
     BOOST_TYPE_ERASURE_MEMBER_II(namespace_name, concept_name, member, N)
     ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:127:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_I'
     BOOST_TYPE_ERASURE_MEMBER_I(
                 \
     ^
any.cpp:13:1: note: in expansion of macro 'BOOST_TYPE_ERASURE_MEMBER'
 BOOST_TYPE_ERASURE_MEMBER((has_post), post);
 ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:194:66: note: candidates
are:
                 *this BOOST_TYPE_ERASURE_MEMBER_FORWARD_REBIND(N));
\
                                                                  ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:239:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_II'
     BOOST_TYPE_ERASURE_MEMBER_II(namespace_name, concept_name, member, N)
     ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:127:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_I'
     BOOST_TYPE_ERASURE_MEMBER_I(
                 \
     ^
any.cpp:13:1: note: in expansion of macro 'BOOST_TYPE_ERASURE_MEMBER'
 BOOST_TYPE_ERASURE_MEMBER((has_post), post);
 ^
In file included from
/data/boost_1_52_0/boost/type_erasure/constructible.hpp:21:0,
                 from /data/boost_1_52_0/boost/type_erasure/builtin.hpp:17,
                 from
/data/boost_1_52_0/boost/type_erasure/detail/normalize.hpp:34,
                 from /data/boost_1_52_0/boost/type_erasure/any.hpp:36,
                 from any.cpp:3:
/data/boost_1_52_0/boost/type_erasure/call.hpp:403:1: note: template<class
Concept, class Op, class ... U> typename
boost::type_erasure::detail::call_result<Op, void(U&& ...), Concept>::type
boost::type_erasure::call(const boost::type_erasure::binding<Concept>&,
const Op&, U&& ...)
 call(
 ^
/data/boost_1_52_0/boost/type_erasure/call.hpp:403:1: note: template
argument deduction/substitution failed:
In file included from any.cpp:8:0:
/data/boost_1_52_0/boost/type_erasure/member.hpp:194:66: note:
'has_post<void(boost::function<void()>&&), const
boost::type_erasure::_self>' is not derived from 'const
boost::type_erasure::binding<Concept>'
                 *this BOOST_TYPE_ERASURE_MEMBER_FORWARD_REBIND(N));
\
                                                                  ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:239:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_II'
     BOOST_TYPE_ERASURE_MEMBER_II(namespace_name, concept_name, member, N)
     ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:127:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_I'
     BOOST_TYPE_ERASURE_MEMBER_I(
                 \
     ^
any.cpp:13:1: note: in expansion of macro 'BOOST_TYPE_ERASURE_MEMBER'
 BOOST_TYPE_ERASURE_MEMBER((has_post), post);
 ^
In file included from
/data/boost_1_52_0/boost/type_erasure/constructible.hpp:21:0,
                 from /data/boost_1_52_0/boost/type_erasure/builtin.hpp:17,
                 from
/data/boost_1_52_0/boost/type_erasure/detail/normalize.hpp:34,
                 from /data/boost_1_52_0/boost/type_erasure/any.hpp:36,
                 from any.cpp:3:
/data/boost_1_52_0/boost/type_erasure/call.hpp:436:1: note: template<class
Op, class ... U> typename boost::type_erasure::detail::call_result<Op,
void(U&& ...)>::type boost::type_erasure::call(const Op&, U&& ...)
 call(
 ^
/data/boost_1_52_0/boost/type_erasure/call.hpp:436:1: note: template
argument deduction/substitution failed:
/data/boost_1_52_0/boost/type_erasure/call.hpp: In substitution of
'template<class Op, class ... U> typename
boost::type_erasure::detail::call_result<Op, void(U&& ...)>::type
boost::type_erasure::call(const Op&, U&& ...) [with Op =
has_post<void(boost::function<void()>&&), const boost::type_erasure::_self>;
U = {const
boost::type_erasure::concept_interface<has_post<void(boost::function<void()>&&),
const boost::type_erasure::_self>,
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<boost::type_erasure::_self>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept,
boost::type_erasure::_self> >, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>&, boost::function<void()>}]':
any.cpp:13:1: required from 'typename
boost::type_erasure::rebind_any<Base, R>::type
boost::type_erasure::concept_interface<has_post<R(A ...), T>, Base, typename
boost::enable_if<boost::type_erasure::detail::should_be_const<T, Base>,
typename boost::remove_const<T>::type>::type, Enable>::post(typename
boost::type_erasure::as_param<Base, A>::type ...) const [with R = void; A =
{boost::function<void()>&&}; T = const boost::type_erasure::_self; Base =
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept> >,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>; Enable = void; typename
boost::enable_if<boost::type_erasure::detail::should_be_const<T, Base>,
typename boost::remove_const<T>::type>::type = boost::type_erasure::_self;
typename boost::type_erasure::rebind_any<Base, R>::type = void]'
any.cpp:37:24: required from here
/data/boost_1_52_0/boost/type_erasure/call.hpp:436:1: error: no type named
'type' in 'struct
boost::type_erasure::detail::call_result<has_post<void(boost::function<void()>&&),
const boost::type_erasure::_self>, void(const
boost::type_erasure::concept_interface<has_post<void(boost::function<void()>&&),
const boost::type_erasure::_self>,
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept> >,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>&,
boost::function<void()>&&), void>'
In file included from any.cpp:8:0:
any.cpp: In instantiation of 'typename boost::type_erasure::rebind_any<Base,
R>::type boost::type_erasure::concept_interface<has_post<R(A ...), T>, Base,
typename boost::enable_if<boost::type_erasure::detail::should_be_const<T,
Base>, typename boost::remove_const<T>::type>::type, Enable>::post(typename
boost::type_erasure::as_param<Base, A>::type ...) const [with R = void; A =
{boost::function<void()>&&}; T = const boost::type_erasure::_self; Base =
boost::type_erasure::concept_interface<boost::type_erasure::copy_constructible<>,
boost::type_erasure::concept_interface<boost::type_erasure::constructible<boost::type_erasure::_self(const
boost::type_erasure::_self&)>,
boost::type_erasure::concept_interface<boost::type_erasure::destructible<boost::type_erasure::_self>,
boost::type_erasure::any_base<boost::type_erasure::any<any_post_concept> >,
boost::type_erasure::_self, void>, boost::type_erasure::_self, void>,
boost::type_erasure::_self, void>; Enable = void; typename
boost::enable_if<boost::type_erasure::detail::should_be_const<T, Base>,
typename boost::remove_const<T>::type>::type = boost::type_erasure::_self;
typename boost::type_erasure::rebind_any<Base, R>::type = void]':
any.cpp:37:24: required from here
/data/boost_1_52_0/boost/type_erasure/member.hpp:194:66: error:
return-statement with a value, in function returning 'void' [-fpermissive]
                 *this BOOST_TYPE_ERASURE_MEMBER_FORWARD_REBIND(N));
\
                                                                  ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:239:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_II'
     BOOST_TYPE_ERASURE_MEMBER_II(namespace_name, concept_name, member, N)
     ^
/data/boost_1_52_0/boost/type_erasure/member.hpp:127:5: note: in expansion
of macro 'BOOST_TYPE_ERASURE_MEMBER_I'
     BOOST_TYPE_ERASURE_MEMBER_I(
                 \
     ^
any.cpp:13:1: note: in expansion of macro 'BOOST_TYPE_ERASURE_MEMBER'
 BOOST_TYPE_ERASURE_MEMBER((has_post), post);
 ^


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