[Boost-bugs] [Boost C++ Libraries] #7189: [gil] conflict between boost range and boost gil

Subject: [Boost-bugs] [Boost C++ Libraries] #7189: [gil] conflict between boost range and boost gil
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-01 12:23:53


#7189: [gil] conflict between boost range and boost gil
------------------------------------------+---------------------------------
 Reporter: kaischroeder3@… | Owner: hljin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: GIL
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
------------------------------------------+---------------------------------
 The following does not compile because it cannot be resolved whether a
 call to boost::range::fill_n or std::fill_n is correct


 #include <boost/array.hpp>
 #include <boost/gil/image_view.hpp>
 #include <boost/gil/image.hpp>
 #include <boost/gil/typedefs.hpp>

 #include <boost/range/algorithm/fill_n.hpp>

 namespace gil = boost::gil;

 int main( int argc, char** argv)
 {
     gil::image<boost::array<float,2> > img;

     std::fill( gil::view(img).begin(), gil::view(img).end(),
 boost::array<float,2>() );
 }



 Error:

 [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<IL>,
 boost::gil::iterator_from_2d<IL>, const V&) [with IL =
 boost::gil::memory_based_2d_locator<boost::gil::memory_based_step_iterator<boost::array<float,
 2ul>*> >, V = boost::array<float, 2ul>]’:
 /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<float, 2ul>*&, std::ptrdiff_t&, const
 boost::array<float, 2ul>&)’ 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&) [with _OI = boost::array<float, 2ul>*, _Size = long
 int, _Tp = boost::array<float, 2ul>]
 /usr/include/boost/range/algorithm/fill_n.hpp:31:22: note: ForwardRange&
 boost::range::fill_n(ForwardRange&, Size, const Value&) [with ForwardRange
 = boost::array<float, 2ul>*, Size = long int, Value = boost::array<float,
 2ul>]
 /usr/include/boost/range/algorithm/fill_n.hpp:41:28: note: const
 ForwardRange& boost::range::fill_n(const ForwardRange&, Size, const
 Value&) [with ForwardRange = boost::array<float, 2ul>*, Size = long int,
 Value = boost::array<float, 2ul>]
 make[3]: *** [CMakeFiles/test_misc.dir/test_misc.cpp.o] Error 1

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7189>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC