void copy_and_convert_static( typename sge::image::traits::const_view< Tag >::type const &_src, typename sge::image::traits::view< Tag >::type const &_dest, sge::image::algorithm::may_overlap const _overlap, sge::image::algorithm::uninitialized const _uninitialized ) { fcppt::variant::apply_binary( [ _overlap, _uninitialized ]( auto const &_src_inner, auto const &_dest_inner ) { return mizuiro::image::algorithm::copy_and_convert< typename sge::image::impl::traits::static_converter< typename sge::image::traits::color_tag< Tag >::type >::type >( _src_inner, _dest_inner, sge::image::impl::algorithm::convert_may_overlap( _overlap ), sge::image::impl::algorithm::convert_uninitialized( _uninitialized ) ); }, _src.get(), _dest.get() ); }
void sge::image::algorithm::copy( typename sge::image::traits::const_view< Tag >::type const &_src, typename sge::image::traits::view< Tag >::type const &_dest, sge::image::algorithm::may_overlap const _overlap, sge::image::algorithm::uninitialized const _uninitialized ) try { fcppt::variant::apply_unary( [ &_dest, _overlap, _uninitialized ]( auto const &_src_inner ) { return mizuiro::image::algorithm::copy( _src_inner, fcppt::variant::get_exn< typename sge::image::view::mizuiro_type< sge::image::impl::view::format_type< decltype( _src_inner ) >, mizuiro::nonconst_tag >::type >( _dest.get() ), sge::image::impl::algorithm::convert_may_overlap( _overlap ), sge::image::impl::algorithm::convert_uninitialized( _uninitialized ) ); }, _src.get() ); } catch( fcppt::variant::invalid_get const & ) { throw sge::image::algorithm::invalid_copy< typename sge::image::traits::color_tag< Tag >::type >{ sge::image::view::format< Tag >( _src ), sge::image::view::format< Tag >( _dest ) }; }