2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-27 05:02:19 +00:00

Replace some uses of boost::is_same with std::is_same (#225)

Those are places boost::is_same can be replaced in non-intrusive way.
Remaining are types derived from boost::is_same, where the replacing
would affect all their uses - effectively switching from boost::true_/false_ types
to std::true_type and std::false_type.
Such change needs to come along with Boost.MPL to MP11 migration.
This commit is contained in:
Mateusz Łoskot
2019-01-27 10:54:05 +00:00
committed by GitHub
parent afcdeb04cd
commit 45ca507ca3
10 changed files with 54 additions and 27 deletions

View File

@@ -12,6 +12,7 @@
#include <exception>
#include <iostream>
#include <type_traits>
#include <vector>
using namespace boost::gil;
@@ -49,10 +50,10 @@ void test_pixel_iterator()
boost::function_requires<HasDynamicXStepTypeConcept<bgr121_ptr_t> >();
// TEST dynamic_step_t
static_assert(boost::is_same<cmyk16_step_ptr_t, dynamic_x_step_type<cmyk16_step_ptr_t>::type>::value, "");
static_assert(boost::is_same<cmyk16_planar_step_ptr_t, dynamic_x_step_type<cmyk16_planar_ptr_t>::type>::value, "");
static_assert(std::is_same<cmyk16_step_ptr_t, dynamic_x_step_type<cmyk16_step_ptr_t>::type>::value, "");
static_assert(std::is_same<cmyk16_planar_step_ptr_t, dynamic_x_step_type<cmyk16_planar_ptr_t>::type>::value, "");
static_assert(boost::is_same<iterator_type<uint8_t,gray_layout_t,false,false,false>::type,gray8c_ptr_t>::value, "");
static_assert(std::is_same<iterator_type<uint8_t,gray_layout_t,false,false,false>::type,gray8c_ptr_t>::value, "");
// TEST iterator_is_step
static_assert(iterator_is_step<cmyk16_step_ptr_t>::value, "");
@@ -68,17 +69,17 @@ void test_pixel_iterator()
static_assert(!iterator_is_step<rgb2gray_ptr>::value, "");
using rgb2gray_step_ptr = dynamic_x_step_type<rgb2gray_ptr>::type;
static_assert(boost::is_same<rgb2gray_step_ptr, dereference_iterator_adaptor<rgb8_step_ptr_t, ccv_rgb_g_fn>>::value, "");
static_assert(std::is_same<rgb2gray_step_ptr, dereference_iterator_adaptor<rgb8_step_ptr_t, ccv_rgb_g_fn>>::value, "");
make_step_iterator(rgb2gray_ptr(),2);
using rgb2gray_step_ptr1 = dereference_iterator_adaptor<rgb8_step_ptr_t, ccv_rgb_g_fn>;
static_assert(iterator_is_step<rgb2gray_step_ptr1>::value, "");
static_assert(boost::is_same<rgb2gray_step_ptr1, dynamic_x_step_type<rgb2gray_step_ptr1>::type>::value, "");
static_assert(std::is_same<rgb2gray_step_ptr1, dynamic_x_step_type<rgb2gray_step_ptr1>::type>::value, "");
using rgb2gray_step_ptr2 = memory_based_step_iterator<dereference_iterator_adaptor<rgb8_ptr_t, ccv_rgb_g_fn>>;
static_assert(iterator_is_step<rgb2gray_step_ptr2 >::value, "");
static_assert(boost::is_same<rgb2gray_step_ptr2, dynamic_x_step_type<rgb2gray_step_ptr2>::type>::value, "");
static_assert(std::is_same<rgb2gray_step_ptr2, dynamic_x_step_type<rgb2gray_step_ptr2>::type>::value, "");
make_step_iterator(rgb2gray_step_ptr2(),2);
// bit_aligned iterators test