Subject: Re: [boost] [TypeErasure] Forward constructors and binded types
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-19 08:06:30
On 07/19/12 06:08, Larry Evans wrote:
> On 07/18/12 01:29, Vicente J. Botet Escriba wrote:
>> In the example from the doc
>> typedef mpl::vector<
>> constructible<_a(const _b&, const _c&)>
>> > construct;
>> std::vector<double> vec;
>> int i = 10;
>> double d = 2.5;
>> tuple<construct, _a&, _b, _c> t(vec, i, d);
>> any<construct, _a> v(get<1>(t), get<2>(t));
> The 1st attachment, composed from above, doesn't compile,
> giving errors in 2nd attachment.
> svn update shows:
> Updated to revision 79597.
> How should the code be changed to allow compilation?
It compiles OK when the -std=gnu++11 option is removed.
However, it's still producing warnings like:
../../../boost/type_erasure/detail/adapt_to_vtable.hpp: In static member
function 'static R
typedef 'traits' locally defined but not used [-Wunused-local-typedefs]
In file included from botet_construct.cpp:6:0:
../../../boost/type_erasure/any_cast.hpp: In function 'T
../../../boost/type_erasure/any_cast.hpp:132:13: warning: typedef
'tag_type' locally defined but not used [-Wunused-local-typedefs]
This is with compiler:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk