Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4189: Add better support for non-default constructible function objects
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-21 22:54:24
#4189: Add better support for non-default constructible function objects
-------------------------------+--------------------------------
Reporter: djwalker | Owner: jeffrey.hellrung
Type: Feature Requests | Status: new
Milestone: Boost 1.43.0 | Component: iterator
Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords: transform_iterator
-------------------------------+--------------------------------
Comment (by olivier-m.pena@â¦):
Same problem than Taras here : transform_iterator assigned to an any_range
with gcc 4.8.1. Even without closure.
If not assigned to an any_range, it's ok.
{{{
typedef boost::any_range<int, boost::forward_traversal_tag, int,
std::ptrdiff_t> int_range;
std::vector<int> v;
// Fail.
int_range range1 = v | boost::adaptors::transformed(
[](const int& i) {return i * 2; });
// Ok.
int_range range2 = v | boost::adaptors::transformed(
std::function<int(const int&)>(
[](const int& i) {return i * 2; }));
}}}
I would like to add that clang 3.3 compiles successfully.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4189#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC