
On 07/26/12 09:02, Steven Watanabe wrote:
AMDG
On 07/26/2012 05:29 AM, Larry Evans wrote:
The attached, when compiled with with gcc4.8-20120624, produces compile error:
../../../boost/type_erasure/detail/construct.hpp: In instantiation of 'boost::type_erasure::any<Concept, T>::any(const boost::type_erasure::binding<Concept>&, U0&) [with U0 = value<boost::type_erasure::_a>; Concept = boost::mpl::vector<boost::type_erasure::copy_constructible<boost::type_erasure::_a>, boost::type_erasure::copy_constructible<boost::type_erasure::_b> >; T = boost::type_erasure::_a]': binding_of.cpp:71:32: required from here ../../../boost/type_erasure/detail/construct.hpp:99:9: error: invalid use of void expression ) ^
Am I doing something wrong?
The concept doesn't contain anything that matches an argument of type value<_a>.
Then why isn't a similar compile error produced when b_any is constructed? A revised test driver(attached) uses double instead of value<_a> and value<_b> and it still produces the same error. In addition, when bindings_made instead of b_bindings is used to make a_any, it compiles and runs without problem whether value<_a> or value<_a>::type (i.e. double) is used as the value arg to AnyA. -regards, Larry