// // 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 // // FIXME: Avoid Clang's flooding of non-disableable warnings like: // "T does not declare any constructor to initialize its non-modifiable members" // when compiling with concepts check enabled. // See https://bugs.llvm.org/show_bug.cgi?id=41759 #if !defined(BOOST_GIL_USE_CONCEPT_CHECK) && !defined(__clang__) #error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined #endif #include #include #include #include "test_fixture.hpp" namespace gil = boost::gil; namespace mp11 = boost::mp11; using boost::function_requires; template class Concept> struct assert_concept { template void operator()(Pixel&&) { function_requires>(); } }; template class Concept, typename... Pixels> void test_concept() { mp11::mp_for_each(assert_concept()); } int main() { test_concept(); test_concept(); using rgb565_pixel_t = gil::packed_pixel_type < std::uint16_t, mp11::mp_list_c, gil::rgb_layout_t >::type; function_requires>(); function_requires>(); using bgr556_pixel_t = gil::packed_pixel_type < std::uint16_t, mp11::mp_list_c, gil::bgr_layout_t>::type; function_requires>(); function_requires>(); function_requires>(); return 0; }