Subject: [Boost-bugs] [Boost C++ Libraries] #11558: boost transform iterator doesn't work with libc++
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-20 01:08:35
#11558: boost transform iterator doesn't work with libc++
-------------------------+------------------------------
Reporter: rnickb731@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.57.0
Severity: Problem | Keywords:
-------------------------+------------------------------
The following code won't compile with clang using these options:
clang++ -std=c++14 -stdlib=libc++ main.cpp
#include <boost/iterator/counting_iterator.hpp>
#include <boost/iterator/transform_iterator.hpp>
double f(int i) { return i; }
int main() {
auto i =
boost::make_transform_iterator(boost::make_counting_iterator(3), f);
std::next(i);
return 0;
}
It gives me this error:
main.cpp:8:3: error: no matching function for call to 'next'
std::next(i);
^~~~~~~~~
/usr/local/bin/../include/c++/v1/iterator:510:25: note: candidate template
ignored: disabled by 'enable_if' [with
_ForwardIter = boost::iterators::transform_iterator<double (*)(int),
boost::iterators::counting_iterator<int,
boost::iterators::use_default, boost::iterators::use_default>,
boost::iterators::use_default,
boost::iterators::use_default>]
typename enable_if<__is_forward_iterator<_ForwardIter>::value>::type*
= 0)
^
1 error generated.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11558> 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:18 UTC