Hi folks,
The following code fails to compile on OSX 10.8.5 with Xcode 5.0.1 and Boost 1.49.0. This is not real world code, but it demonstrates the problem I'm facing.
#include
template<typename T>
void foo()
{
boost::zip_iterator > iter;
std::fill(iter, iter, std::make_pair(T(),T()));
}
void bar()
{
foo<int>();
}
Here are the commands I used to compile (if I drop "-stdlib=libc++" from the compile line, the code compiles just fine):
setenv DEVELOPER_DIR /Applications/Xcode5.0.1.app/Contents/Developer
xcrun -sdk macosx10.8 clang++ -c zip_iterator.cpp -I<boost-path>/include -std=c++11 -stdlib=libc++
and here is a heavily formatted snippet of the key error:
/Applications/Xcode5.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/algorithm:1824:1:
note: candidate function
[with _RandomAccessIterator = boost::zip_iterator>, _Tp = std::__1::pair]
not viable: no known conversion from
typename iterator_traits>>::iterator_category
(aka 'boost::detail::iterator_category_with_traversal')
to
'std::__1::random_access_iterator_tag'
for 4th argument
__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value_, random_access_iterator_tag)
Any help is appreciated.
Thanks,
Jon