|
Boost : |
Subject: Re: [boost] [iterator] function_output_iterator constructed from a lambda function is not assignable
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2016-02-17 10:23:00
Hi,
2016-02-15 4:42 GMT+09:00 Mikhail Matrosov <mikhail.matrosov_at_[hidden]>:
> Consider the following code snippet:
>
> auto f = [](int x) { std::cout << x; };auto it =
> boost::make_function_output_iterator(f);decltype(it) it2 = it; // Ok,
> copied
> it2 = it; // Does not compile, cannot assign!
>
FYI, My library has `regular` function.
The function convert function object to `DefaultConstructible` &
`Assignable`.
Implementation:
https://github.com/Flast/OvenToBoost/blob/master/include/boost/range/regular.hpp
https://github.com/Flast/OvenToBoost/blob/master/include/boost/range/detail/indirect_functor.hpp
https://github.com/Flast/OvenToBoost/blob/master/include/boost/range/detail/indirect_functor_invoke_pp.hpp
https://github.com/Flast/OvenToBoost/blob/master/include/boost/range/detail/indirect_functor_result_pp.hpp
The Boost Range Extension library is now waiting review.
http://www.boost.org/community/review_schedule.html
And FYI, related pull request:
https://github.com/boostorg/iterator/pull/20
Thanks,
Akira
>>========================
Akira Takahashi
http://faithandbrave.github.io/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk