Boost C++ Libraries: Ticket #9396: circular_buffer + gil compiler error
https://svn.boost.org/trac10/ticket/9396
<p>
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?
</p>
<p>
Tested on: Windows 7 SP1 x64 + MSVC 2010 SP1
</p>
<pre class="wiki">#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;
}
</pre>en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/9396
Trac 1.4.3