Closed marco-langer closed 2 years ago
Following the Rule of Zero, this PR removes the user-defined copy constructor and copy assignment operator from packed_pixel. The type is now trivially copyable and trivially assignable:
packed_pixel
#include <boost/gil.hpp> #include <boost/mp11.hpp> #include <type_traits> namespace gil = boost::gil; namespace mp11 = boost::mp11; int main() { using packed_channel_references_3 = typename gil::detail::packed_channel_references_vector_type < std::uint8_t, mp11::mp_list_c<int, 3> >::type; using packed_pixel_gray3 = gil::packed_pixel < std::uint8_t, packed_channel_references_3, gil::gray_layout_t >; static_assert(std::is_trivially_copyable<packed_pixel_gray3>::value); static_assert(std::is_trivially_assignable<packed_pixel_gray3, packed_pixel_gray3>::value); return 0; }
Description
Following the Rule of Zero, this PR removes the user-defined copy constructor and copy assignment operator from
packed_pixel
. The type is now trivially copyable and trivially assignable:Tasklist