Boost logo

Boost :

Subject: Re: [boost] Review Request : Boost.Range Extension
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-06-08 08:40:38


Akira Takahashi wrote:
>> `as_container` looks interesting!
>
> `as_container` is experimental feature. not include primary release.
> (moved to experimental directory.)

OK, so it is undocumented :)

>> * Template conversion operator ambiguity:
>> In C++03 and C++11, the following code
>>    boost::array<int, 3> ar = {{1, 2, 3}};
>>    std::vector<int> v(ar | as_container);
>> fails to compile...
>>
>> In C++11, the following code
>>    boost::array<int, 3> ar = {{1, 2, 3}};
>>    std::vector<int> v;
>>    v = ar | as_container;
>> fails to compile...
<snip>
> Interesting.
> I think better way is disable_if<!is_initializer_list<Container>>.
> I will solve later.

> #if !defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)

`BOOST_NO_INITIALIZER_LISTS` is decpreated.
Use `BOOST_NO_CXX11_HDR_INITIALIZER_LIST` instead.
Please consult to the doc (in trunk) of Boost.Config.

Regards,
Michel


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