Skip to content

Commit

Permalink
Do not call propagate_on_container_swap for C++14
Browse files Browse the repository at this point in the history
  • Loading branch information
mloskot committed Jun 27, 2022
1 parent e692416 commit 59703e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/boost/gil/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,14 @@ class image
swap(_align_in_bytes, img._align_in_bytes);
swap(_memory, img._memory);
swap(_view, img._view);
#ifdef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
swap(_alloc, img._alloc);
#else
if constexpr (std::allocator_traits<Alloc>::propagate_on_container_swap::value)
swap(_alloc, img._alloc);
else
BOOST_ASSERT(_alloc == img._alloc);
#endif
swap(_allocated_bytes, img._allocated_bytes );
}

Expand Down

0 comments on commit 59703e6

Please sign in to comment.