Boost C++ Libraries: Ticket #7189: [gil] conflict between boost range and boost gil https://svn.boost.org/trac10/ticket/7189 <p> The following does not compile because it cannot be resolved whether a call to boost::range::fill_n or std::fill_n is correct </p> <pre class="wiki">#include &lt;boost/array.hpp&gt; #include &lt;boost/gil/image_view.hpp&gt; #include &lt;boost/gil/image.hpp&gt; #include &lt;boost/gil/typedefs.hpp&gt; #include &lt;boost/range/algorithm/fill_n.hpp&gt; namespace gil = boost::gil; int main( int argc, char** argv) { gil::image&lt;boost::array&lt;float,2&gt; &gt; img; std::fill( gil::view(img).begin(), gil::view(img).end(), boost::array&lt;float,2&gt;() ); } </pre><p> Error: </p> <pre class="wiki">[100%] Building CXX object CMakeFiles/test_misc.dir/test_misc.cpp.o In file included from /usr/include/boost/gil/image.hpp:29:0, from /media/data2TB/data_win/Code/weavepattern/ActiveGrid/tests/test_misc.cpp:3: /usr/include/boost/gil/algorithm.hpp: In function ‘void std::fill(boost::gil::iterator_from_2d&lt;IL&gt;, boost::gil::iterator_from_2d&lt;IL&gt;, const V&amp;) [with IL = boost::gil::memory_based_2d_locator&lt;boost::gil::memory_based_step_iterator&lt;boost::array&lt;float, 2ul&gt;*&gt; &gt;, V = boost::array&lt;float, 2ul&gt;]’: /media/data2TB/data_win/Code/weavepattern/ActiveGrid/tests/test_misc.cpp:14:86: instantiated from here /usr/include/boost/gil/algorithm.hpp:382:13: error: call of overloaded ‘fill_n(boost::array&lt;float, 2ul&gt;*&amp;, std::ptrdiff_t&amp;, const boost::array&lt;float, 2ul&gt;&amp;)’ is ambiguous /usr/include/boost/gil/algorithm.hpp:382:13: note: candidates are: /usr/include/c++/4.6/bits/stl_algobase.h:775:5: note: _OI std::fill_n(_OI, _Size, const _Tp&amp;) [with _OI = boost::array&lt;float, 2ul&gt;*, _Size = long int, _Tp = boost::array&lt;float, 2ul&gt;] /usr/include/boost/range/algorithm/fill_n.hpp:31:22: note: ForwardRange&amp; boost::range::fill_n(ForwardRange&amp;, Size, const Value&amp;) [with ForwardRange = boost::array&lt;float, 2ul&gt;*, Size = long int, Value = boost::array&lt;float, 2ul&gt;] /usr/include/boost/range/algorithm/fill_n.hpp:41:28: note: const ForwardRange&amp; boost::range::fill_n(const ForwardRange&amp;, Size, const Value&amp;) [with ForwardRange = boost::array&lt;float, 2ul&gt;*, Size = long int, Value = boost::array&lt;float, 2ul&gt;] make[3]: *** [CMakeFiles/test_misc.dir/test_misc.cpp.o] Error 1 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7189 Trac 1.4.3 anonymous Wed, 01 Aug 2012 12:27:28 GMT <link>https://svn.boost.org/trac10/ticket/7189#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7189#comment:1</guid> <description> <p> I should add: This is on Ubuntu 12.04 using gcc 4.6 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mateusz Loskot</dc:creator> <pubDate>Thu, 16 Feb 2017 10:50:18 GMT</pubDate> <title>description changed; cc set https://svn.boost.org/trac10/ticket/7189#comment:2 https://svn.boost.org/trac10/ticket/7189#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">mateusz@…</span> added </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/7189?action=diff&amp;version=2">diff</a>) </li> </ul> Ticket Stefan Seefeld Sat, 01 Jul 2017 21:14:15 GMT owner changed https://svn.boost.org/trac10/ticket/7189#comment:3 https://svn.boost.org/trac10/ticket/7189#comment:3 <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 Mon, 25 Jun 2018 13:18:57 GMT <link>https://svn.boost.org/trac10/ticket/7189#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7189#comment:4</guid> <description> <p> Would this simple change help? </p> <p> Line <a class="ext-link" href="https://github.com/boostorg/gil/blob/d882b844944001f5f94e55aed3faaf651aae3032/include/boost/gil/algorithm.hpp#L377"><span class="icon">​</span>algorithm.hpp:377</a> from </p> <pre class="wiki">fill_n(first.x(), numToDo, val); </pre><p> to </p> <pre class="wiki"> ::std::fill_n(first.x(), numToDo, val); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Mateusz Loskot</dc:creator> <pubDate>Fri, 12 Oct 2018 16:00:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7189#comment:5 https://svn.boost.org/trac10/ticket/7189#comment:5 <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">duplicate</span> </li> </ul> <p> Move to <a class="missing wiki">GitHub</a> PR <a class="ext-link" href="https://github.com/boostorg/gil/pull/152"><span class="icon">​</span>https://github.com/boostorg/gil/pull/152</a> </p> Ticket Mateusz Loskot Sat, 13 Oct 2018 19:38:53 GMT <link>https://svn.boost.org/trac10/ticket/7189#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7189#comment:6</guid> <description> <p> FYI, the patch has been merged into Boos.GIL and should be released in Boost 1.69 </p> <p> <a class="ext-link" href="https://github.com/boostorg/gil/pull/152"><span class="icon">​</span>https://github.com/boostorg/gil/pull/152</a> </p> <p> Thanks! </p> </description> <category>Ticket</category> </item> </channel> </rss>