// // Copyright 2019 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 // #ifndef BOOST_GIL_USE_CONCEPT_CHECK #error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined #endif #include #include #include #include #include "test_fixture.hpp" namespace mpl = boost::mpl; namespace gil = boost::gil; using boost::function_requires; using namespace boost::mp11; template class Concept> struct assert_concept { template void operator()(Pixel&&) { function_requires>(); } }; template class Concept, typename... Pixels> void test_concept() { mp_for_each(assert_concept()); } int main() { test_concept(); test_concept(); using rgb565_pixel_t = gil::packed_pixel_type < std::uint16_t, mpl::vector3_c, gil::rgb_layout_t >::type; function_requires>(); function_requires>(); using bgr556_pixel_t = gil::packed_pixel_type < std::uint16_t, mpl::vector3_c, gil::bgr_layout_t>::type; function_requires>(); function_requires>(); function_requires>(); return 0; }