Boost C++ Libraries: Ticket #10706: boost::spirit::basic_istream_iterator does not satisfy single pass iterator requirements https://svn.boost.org/trac10/ticket/10706 <p> It is not possible, for example, to use boost::iterator_range with spirit::basic_istream_iterator </p> <pre class="wiki">clang++ -v clang version 3.6.0 (trunk 216817) Target: x86_64-apple-darwin14.0.0 Thread model: posix </pre><pre class="wiki">using namespace boost; size (iterator_range&lt;spirit::istream_iterator&gt; ()); </pre><pre class="wiki">In file included from /opt/local/include/boost/spirit/include/qi.hpp:16: In file included from /opt/local/include/boost/spirit/home/qi.hpp:14: In file included from /opt/local/include/boost/spirit/home/qi/action.hpp:14: In file included from /opt/local/include/boost/spirit/home/qi/action/action.hpp:14: In file included from /opt/local/include/boost/spirit/home/qi/meta_compiler.hpp:14: In file included from /opt/local/include/boost/spirit/home/support/meta_compiler.hpp:19: In file included from /opt/local/include/boost/proto/proto.hpp:16: In file included from /opt/local/include/boost/proto/functional.hpp:14: In file included from /opt/local/include/boost/proto/functional/range.hpp:17: In file included from /opt/local/include/boost/proto/functional/range/size.hpp:12: In file included from /opt/local/include/boost/range/size.hpp:21: In file included from /opt/local/include/boost/range/size_type.hpp:20: /opt/local/include/boost/range/concepts.hpp:158:26: error: no matching constructor for initialization of 'boost::spirit::basic_istream_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt;' Iterator i2(++i); ^ ~~~ /opt/local/include/boost/concept/usage.hpp:16:43: note: in instantiation of member function 'boost::range_detail::SinglePassIteratorConcept&lt;boost::spirit::basic_istream_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt; &gt;::~SinglePassIteratorConcept' requested here ~usage_requirements() { ((Model*)0)-&gt;~Model(); } ^ /opt/local/include/boost/concept/detail/general.hpp:38:42: note: in instantiation of member function 'boost::concepts::usage_requirements&lt;boost::range_detail::SinglePassIteratorConcept&lt;boost::spirit::basic_istream_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt; &gt; &gt;::~usage_requirements' requested here static void failed() { ((Model*)0)-&gt;~Model(); } ^ /opt/local/include/boost/range/concepts.hpp:156:13: note: in instantiation of member function 'boost::concepts::requirement&lt;boost::concepts::failed ************boost::concepts::usage_requirements&lt;boost::range_detail::SinglePassIteratorConcept&lt;boost::spirit::basic_istream_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt; &gt; &gt;::************&gt;::failed' requested here BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) ^ /opt/local/include/boost/concept/usage.hpp:29:7: note: expanded from macro 'BOOST_CONCEPT_USAGE' BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements&lt;model&gt;)); \ ^ /opt/local/include/boost/concept/assert.hpp:43:5: note: expanded from macro 'BOOST_CONCEPT_ASSERT' BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) ^ /opt/local/include/boost/concept/detail/general.hpp:78:51: note: expanded from macro 'BOOST_CONCEPT_ASSERT_FN' &amp;::boost::concepts::requirement_&lt;ModelFnPtr&gt;::failed&gt; \ ^ /opt/local/include/boost/spirit/home/support/iterators/istream_iterator.hpp:56:18: note: candidate constructor not viable: no known conversion from 'boost::spirit::multi_pass&lt;std::__1::basic_istream&lt;char&gt;, boost::spirit::iterator_policies::default_policy&lt;boost::spirit::iterator_policies::ref_counted, boost::spirit::iterator_policies::no_check, boost::spirit::iterator_policies::istream, boost::spirit::iterator_policies::split_std_deque&gt; &gt;' to 'std::basic_istream&lt;char, char_traits&lt;char&gt; &gt; &amp;' for 1st argument explicit basic_istream_iterator(std::basic_istream&lt;Elem, Traits&gt;&amp; x) ^ /opt/local/include/boost/spirit/home/support/iterators/istream_iterator.hpp:59:9: note: candidate constructor not viable: no known conversion from 'boost::spirit::multi_pass&lt;std::__1::basic_istream&lt;char&gt;, boost::spirit::iterator_policies::default_policy&lt;boost::spirit::iterator_policies::ref_counted, boost::spirit::iterator_policies::no_check, boost::spirit::iterator_policies::istream, boost::spirit::iterator_policies::split_std_deque&gt; &gt;' to 'const boost::spirit::basic_istream_iterator&lt;char, std::__1::char_traits&lt;char&gt; &gt;' for 1st argument basic_istream_iterator(basic_istream_iterator const&amp; x) ^ /opt/local/include/boost/spirit/home/support/iterators/istream_iterator.hpp:53:9: note: candidate constructor not viable: requires 0 arguments, but 1 was provided basic_istream_iterator() ^ 1 error generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10706 Trac 1.4.3 Nikki Chumakov <nikkikom@…> Tue, 28 Oct 2014 15:23:42 GMT summary changed https://svn.boost.org/trac10/ticket/10706#comment:1 https://svn.boost.org/trac10/ticket/10706#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::spirit::basic_istream_iterator does not satisfy single pass iterator concept</span> → <span class="trac-field-new">boost::spirit::basic_istream_iterator does not satisfy single pass iterator requirements</span> </li> </ul> Ticket