Boost C++ Libraries: Ticket #8896: image_view compile error under clang 3.1 https://svn.boost.org/trac10/ticket/8896 <p> The definition of template &lt;std::size_t D&gt; typename axis&lt;D&gt;::iterator image_view::axis_iterator(const point&amp; p) (image_view.hpp, line 139) confuses clang++ 3.8. The following program fails to compile. </p> <p> <strong>Example program</strong> </p> <pre class="wiki"> #include &lt;iostream&gt; #include &lt;boost/gil/gil_all.hpp&gt; using namespace boost; using namespace gil; int main(int argc, char **argv) { gray8_image_t img(2,2); gray8_view_t vw(view(img)); gray8_view_t::point_t p(0,0); gray8_view_t::axis&lt;0&gt;::iterator iter = vw.axis_iterator&lt;0&gt;(p); std::cout &lt;&lt; (*iter)[0] &lt;&lt; std::endl; return 0; } </pre><p> <strong>clang++ error:</strong> </p> <pre class="wiki">clang++ -Wall -I/usr/local/include/ -c img.cpp In file included from img.cpp:2: In file included from /usr/local/include/boost/gil/gil_all.hpp:27: In file included from /usr/local/include/boost/gil/algorithm.hpp:27: /usr/local/include/boost/gil/image_view.hpp:139:104: error: reference to non-static member function must be called template &lt;std::size_t D&gt; typename axis&lt;D&gt;::iterator axis_iterator(const point_t&amp; p) const { return _pixels.axis_iterator&lt;D&gt;(p); } ^~~~~~~~~~~~~~~~~~~~~ img.cpp:12:47: note: in instantiation of function template specialization 'boost::gil::image_view&lt;boost::gil::memory_based_2d_locator&lt;boost::gil::memory_based_step_iterator&lt;boost::gil::pixel&lt;unsigned char, boost::gil::layout&lt;boost::mpl::vector1&lt;boost::gil::gray_color_t&gt;, boost::mpl::range_c&lt;int, 0, 1&gt; &gt; &gt; *&gt; &gt; &gt;::axis_iterator&lt;0&gt;' requested here gray8_view_t::axis&lt;0&gt;::iterator iter = vw.axis_iterator&lt;0&gt;(p); ^ In file included from img.cpp:2: In file included from /usr/local/include/boost/gil/gil_all.hpp:27: In file included from /usr/local/include/boost/gil/algorithm.hpp:27: /usr/local/include/boost/gil/image_view.hpp:139:125: error: invalid operands to binary expression ('&lt;bound member function type&gt;' and 'unsigned long') template &lt;std::size_t D&gt; typename axis&lt;D&gt;::iterator axis_iterator(const point_t&amp; p) const { return _pixels.axis_iterator&lt;D&gt;(p); } ~~~~~~~~~~~~~~~~~~~~~^~ 2 errors generated. *** [img.o] Error code 1 </pre><p> A patch is attached which works against clang 3.8 and gcc 4.2.1. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8896 Trac 1.4.3 Shaun Marko <shaunm@…> Wed, 24 Jul 2013 18:49:37 GMT attachment set https://svn.boost.org/trac10/ticket/8896 https://svn.boost.org/trac10/ticket/8896 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patch.txt</span> </li> </ul> <p> image_view.hpp patch </p> Ticket Shaun Marko <shaunm@…> Thu, 25 Jul 2013 14:24:50 GMT summary changed https://svn.boost.org/trac10/ticket/8896#comment:1 https://svn.boost.org/trac10/ticket/8896#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">image_view compile error under clang++ 3.8</span> → <span class="trac-field-new">image_view compile error under clang 3.1</span> </li> </ul> <p> <strong>Correction:</strong> clang 3.1 </p> Ticket Shaun Marko <smarko@…> Thu, 25 Jul 2013 14:30:15 GMT cc set https://svn.boost.org/trac10/ticket/8896#comment:2 https://svn.boost.org/trac10/ticket/8896#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">smarko@…</span> added </li> </ul> Ticket viboes Sun, 04 Aug 2013 07:51:51 GMT component changed; owner set https://svn.boost.org/trac10/ticket/8896#comment:3 https://svn.boost.org/trac10/ticket/8896#comment:3 <ul> <li><strong>owner</strong> set to <span class="trac-author">Hailin Jin</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">GIL</span> </li> </ul> Ticket Mateusz Loskot Thu, 16 Feb 2017 10:52:17 GMT cc changed https://svn.boost.org/trac10/ticket/8896#comment:4 https://svn.boost.org/trac10/ticket/8896#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">mateusz@…</span> added </li> </ul> Ticket Stefan Seefeld Sat, 01 Jul 2017 21:15:35 GMT owner changed https://svn.boost.org/trac10/ticket/8896#comment:5 https://svn.boost.org/trac10/ticket/8896#comment:5 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Hailin Jin</span> to <span class="trac-author">Stefan Seefeld</span> </li> </ul> Ticket Mateusz Loskot Thu, 23 Aug 2018 14:01:00 GMT <link>https://svn.boost.org/trac10/ticket/8896#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8896#comment:6</guid> <description> <p> Fixed by pending pull request <a class="ext-link" href="https://github.com/boostorg/gil/pull/129"><span class="icon">​</span>https://github.com/boostorg/gil/pull/129</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mateusz Loskot</dc:creator> <pubDate>Thu, 23 Aug 2018 14:01:07 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/8896#comment:7 https://svn.boost.org/trac10/ticket/8896#comment:7 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.69</span> </li> </ul> Ticket Mateusz Loskot Mon, 27 Aug 2018 07:11:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8896#comment:8 https://svn.boost.org/trac10/ticket/8896#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket