Boost C++ Libraries: Ticket #8339: Iterator facade does not work for const iterator with array value type https://svn.boost.org/trac10/ticket/8339 <p> The following code fails to compile: </p> <pre class="wiki">#include &lt;boost/iterator/iterator_facade.hpp&gt; struct iterator : boost::iterator_facade&lt;iterator, char [4], boost::random_access_traversal_tag, char const (&amp;)[4]&gt; { }; </pre><p> (I omitted the body of the derived class, but that's irrelevant, it's not what's causing the error). </p> <p> The error is: </p> <pre class="wiki">In file included from test.cpp:1: In file included from boost/iterator/iterator_facade.hpp:17: boost/iterator/detail/operator_brackets_dispatch.hpp:33:12: error: function cannot return array type 'result_type' (aka 'char [4]') static result_type apply(Iterator const &amp; i) ^ boost/iterator/iterator_facade.hpp:583:16: note: in instantiation of template class 'boost::detail::operator_brackets_value&lt;char [4]&gt;' requested here typename operator_brackets_dispatch_::result_type ^ test.cpp:3:19: note: in instantiation of template class 'boost::iterator_facade&lt;iterator, char [4], boost::random_access_traversal_tag, char const (&amp;)[4], long&gt;' requested here struct iterator : boost::iterator_facade&lt;iterator, ^ In file included from test.cpp:1: boost/iterator/iterator_facade.hpp:583:7: error: function cannot return array type 'typename operator_brackets_dispatch_::result_type' (aka 'char [4]') typename operator_brackets_dispatch_::result_type ^ test.cpp:3:19: note: in instantiation of template class 'boost::iterator_facade&lt;iterator, char [4], boost::random_access_traversal_tag, char const (&amp;)[4], long&gt;' requested here struct iterator : boost::iterator_facade&lt;iterator, ^ </pre><p> It would be great if this use case could be supported. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8339 Trac 1.4.3