[Boost-bugs] [Boost C++ Libraries] #9396: circular_buffer + gil compiler error

Subject: [Boost-bugs] [Boost C++ Libraries] #9396: circular_buffer + gil compiler error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-15 12:34:49


#9396: circular_buffer + gil compiler error
---------------------------------------+-----------------------------
 Reporter: g.kuehnert <g.kuehnert@…> | Owner: jano_gaspar
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: circular_buffer
  Version: Boost 1.55.0 | Severity: Regression
 Keywords: |
---------------------------------------+-----------------------------
 When 'boost/gil/bit_aligned_pixel_iterator.hpp' is included, the compiler
 selects for whatever reason an std::uninitialized_copy overload from the
 gil header instead of boost::cb_detail::uninitialized_copy within
 boost::cb_detail::uninitialized_move_if_noexcept_impl
 (boost/circualr_buffer/details.hpp) for types with
 !boost::is_nothrow_move_constructible.
 A workaround (solution?) is to fully qualify the call to
 boost::cb_detail::uninitialized_copy, but why the std overload gets even
 selected? Is this a compiler bug? Or a gil problem?

 Tested on: Windows 7 SP1 x64 + MSVC 2010 SP1

 {{{
 #include <boost/circular_buffer.hpp>
 #include <boost/gil/bit_aligned_pixel_iterator.hpp> // comment this to
 resolve

 struct Foo
 {
         Foo(const Foo&) {}
 };

 int main(int, char*[])
 {

 #if 1

         boost::circular_buffer<Foo> buffer;

         buffer.set_capacity(42);

 #endif

 #if 0 // minimum example

         typedef boost::cb_details::iterator<
                 boost::circular_buffer<int>
                 , boost::cb_details::nonconst_traits<
                         std::allocator<int>
>
> InputIterator;

 boost::cb_details::uninitialized_move_if_noexcept_impl<int>(InputIterator(),
 InputIterator(), (int*)nullptr, boost::false_type());

 #endif

         return 0;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9396>
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:14 UTC