id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11228,Unable to compile a filtered recursive_directory_iterator range.,anonymous,Beman Dawes,"From http://stackoverflow.com/q/29823931/264476. The following code fails to compile with 1.58.0 while it was compiling with 1.55. {{{#!cpp #include #include #include #include #include #include namespace fs = boost::filesystem; using namespace boost::adaptors; int main() { fs::recursive_directory_iterator beg("".""), end; auto fileFilter = [](fs::path const & path) { return is_regular_file(path); }; std::vector paths; copy(boost::make_iterator_range(beg, end) | filtered(fileFilter), std::back_inserter(paths)); for(auto& p : paths) std::cout << p << ""\n""; } }}} With the following error: {{{ In file included from /usr/local/include/boost/range/concepts.hpp:19:0, from /usr/local/include/boost/range/size_type.hpp:20, from /usr/local/include/boost/range/size.hpp:21, from /usr/local/include/boost/range/functions.hpp:20, from /usr/local/include/boost/range.hpp:18, from main.cpp:5: /usr/local/include/boost/concept_check.hpp: In instantiation of 'boost::Convertible::~Convertible() [with X = boost::iterators::single_pass_traversal_tag; Y = boost::iterators::forward_traversal_tag]': /usr/local/include/boost/concept/detail/general.hpp:38:28: required from 'static void boost::concepts::requirement::failed() [with Model = boost::Convertible]' /usr/local/include/boost/range/concepts.hpp:189:13: required from 'struct boost::range_detail::ForwardIteratorConcept' /usr/local/include/boost/concept/detail/has_constraints.hpp:32:62: required by substitution of 'template boost::concepts::detail::yes boost::concepts::detail::has_constraints_(Model*, boost::concepts::detail::wrap_constraints*) [with Model = boost::range_detail::ForwardIteratorConcept]' /usr/local/include/boost/concept/detail/has_constraints.hpp:42:5: required from 'const bool boost::concepts::not_satisfied >::value' /usr/local/include/boost/concept/detail/has_constraints.hpp:45:31: required from 'struct boost::concepts::not_satisfied >' /usr/local/include/boost/mpl/if.hpp:67:11: [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /usr/local/include/boost/concept/detail/has_constraints.hpp:42:5: required from 'const bool boost::concepts::not_satisfied > >::value' /usr/local/include/boost/concept/detail/has_constraints.hpp:45:31: required from 'struct boost::concepts::not_satisfied > >' /usr/local/include/boost/mpl/if.hpp:67:11: required from 'struct boost::mpl::if_ > >, boost::concepts::constraint > >, boost::concepts::requirement >::************> >' /usr/local/include/boost/concept/detail/general.hpp:50:8: required from 'struct boost::concepts::requirement_ >)>' /usr/local/include/boost/range/algorithm/find_end.hpp:50:5: required from 'boost::range_detail::filtered_range boost::range_detail::operator|(const ForwardRange&, const boost::range_detail::filter_holder&) [with ForwardRange = boost::iterator_range; Predicate = main()::]' main.cpp:20:68: required from here /usr/local/include/boost/concept_check.hpp:210:13: error: conversion from 'boost::iterators::single_pass_traversal_tag' to non-scalar type 'boost::iterators::forward_traversal_tag' requested Y y = x; ^ In file included from /usr/local/include/boost/range/size_type.hpp:20:0, from /usr/local/include/boost/range/size.hpp:21, from /usr/local/include/boost/range/functions.hpp:20, from /usr/local/include/boost/range.hpp:18, from main.cpp:5: /usr/local/include/boost/range/concepts.hpp: In instantiation of 'boost::range_detail::ForwardIteratorConcept::~ForwardIteratorConcept() [with Iterator = boost::filesystem::recursive_directory_iterator]': /usr/local/include/boost/concept/detail/general.hpp:38:28: required from 'static void boost::concepts::requirement::failed() [with Model = boost::range_detail::ForwardIteratorConcept]' /usr/local/include/boost/range/concepts.hpp:319:9: required from 'struct boost::ForwardRangeConcept >' /usr/local/include/boost/concept/detail/has_constraints.hpp:32:62: required by substitution of 'template boost::concepts::detail::yes boost::concepts::detail::has_constraints_(Model*, boost::concepts::detail::wrap_constraints*) [with Model = boost::ForwardRangeConcept >]' /usr/local/include/boost/concept/detail/has_constraints.hpp:42:5: required from 'const bool boost::concepts::not_satisfied > >::value' /usr/local/include/boost/concept/detail/has_constraints.hpp:45:31: required from 'struct boost::concepts::not_satisfied > >' /usr/local/include/boost/mpl/if.hpp:67:11: required from 'struct boost::mpl::if_ > >, boost::concepts::constraint > >, boost::concepts::requirement >::************> >' /usr/local/include/boost/concept/detail/general.hpp:50:8: required from 'struct boost::concepts::requirement_ >)>' /usr/local/include/boost/range/algorithm/find_end.hpp:50:5: required from 'boost::range_detail::filtered_range boost::range_detail::operator|(const ForwardRange&, const boost::range_detail::filter_holder&) [with ForwardRange = boost::iterator_range; Predicate = main()::]' main.cpp:20:68: required from here /usr/local/include/boost/range/concepts.hpp:201:32: error: no matching function for call to 'boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(boost::mpl::eval_if, boost::mpl::not_ >, mpl_::bool_, mpl_::bool_, mpl_::bool_ >, boost::mpl::if_, boost::iterators::detail::postfix_increment_proxy, boost::iterators::detail::writable_postfix_increment_proxy >, boost::mpl::identity >::type)' Iterator i2(i++); ^ /usr/local/include/boost/range/concepts.hpp:201:32: note: candidates are: In file included from /usr/local/include/boost/filesystem.hpp:17:0, from main.cpp:4: /usr/local/include/boost/filesystem/operations.hpp:1066:5: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(const boost::filesystem::path&, boost::system::error_code&) recursive_directory_iterator(const path& dir_path, ^ /usr/local/include/boost/filesystem/operations.hpp:1066:5: note: candidate expects 2 arguments, 1 provided /usr/local/include/boost/filesystem/operations.hpp:1055:5: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(const boost::filesystem::path&, boost::filesystem::symlink_option, boost::system::error_code&) recursive_directory_iterator(const path& dir_path, ^ /usr/local/include/boost/filesystem/operations.hpp:1055:5: note: candidate expects 3 arguments, 1 provided /usr/local/include/boost/filesystem/operations.hpp:1045:14: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(const boost::filesystem::path&, boost::filesystem::symlink_option) explicit recursive_directory_iterator(const path& dir_path, ^ /usr/local/include/boost/filesystem/operations.hpp:1045:14: note: no known conversion for argument 1 from 'boost::mpl::eval_if, boost::mpl::not_ >, mpl_::bool_, mpl_::bool_, mpl_::bool_ >, boost::mpl::if_, boost::iterators::detail::postfix_increment_proxy, boost::iterators::detail::writable_postfix_increment_proxy >, boost::mpl::identity >::type {aka boost::iterators::detail::postfix_increment_proxy}' to 'const boost::filesystem::path&' /usr/local/include/boost/filesystem/operations.hpp:1043:5: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator() recursive_directory_iterator(){} // creates the ""end"" iterator ^ /usr/local/include/boost/filesystem/operations.hpp:1043:5: note: candidate expects 0 arguments, 1 provided /usr/local/include/boost/filesystem/operations.hpp:1035:9: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(const boost::filesystem::recursive_directory_iterator&) class recursive_directory_iterator ^ /usr/local/include/boost/filesystem/operations.hpp:1035:9: note: no known conversion for argument 1 from 'boost::mpl::eval_if, boost::mpl::not_ >, mpl_::bool_, mpl_::bool_, mpl_::bool_ >, boost::mpl::if_, boost::iterators::detail::postfix_increment_proxy, boost::iterators::detail::writable_postfix_increment_proxy >, boost::mpl::identity >::type {aka boost::iterators::detail::postfix_increment_proxy}' to 'const boost::filesystem::recursive_directory_iterator&' /usr/local/include/boost/filesystem/operations.hpp:1035:9: note: boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(boost::filesystem::recursive_directory_iterator&&) /usr/local/include/boost/filesystem/operations.hpp:1035:9: note: no known conversion for argument 1 from 'boost::mpl::eval_if, boost::mpl::not_ >, mpl_::bool_, mpl_::bool_, mpl_::bool_ >, boost::mpl::if_, boost::iterators::detail::postfix_increment_proxy, boost::iterators::detail::writable_postfix_increment_proxy >, boost::mpl::identity >::type {aka boost::iterators::detail::postfix_increment_proxy}' to 'boost::filesystem::recursive_directory_iterator&&' }}} Setting `BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0` allows to compile.",Bugs,closed,Boost 1.59.0,filesystem,Boost 1.58.0,Regression,fixed,,