// // Copyright 2018 Mateusz Loskot // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #ifdef BOOST_GIL_USE_CONCEPT_CHECK // FIXME: Range as pixel does not seem to fulfill pixel concepts due to no specializations required: // pixel.hpp(50) : error C2039 : 'type' : is not a member of 'boost::gil::color_space_type

#undef BOOST_GIL_USE_CONCEPT_CHECK #endif #include #include #include #include #include #include #include #include namespace gil = boost::gil; template void test_array_as_range() { static_assert(ArrayPixel().size() == 2, "two-element array expected"); gil::image img(1, 1); std::fill(gil::view(img).begin(), gil::view(img).end(), ArrayPixel{0, 1}); BOOST_TEST(*gil::view(img).at(0,0) == (ArrayPixel{0, 1})); } int main() { test_array_as_range>(); test_array_as_range>(); return boost::report_errors(); }