// // 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 // #include #include namespace gil = boost::gil; struct Interleaved : std::false_type {}; struct Planar : std::true_type {}; struct NotStepX : std::false_type {}; struct StepX : std::true_type {}; struct Immutable : std::false_type {}; struct Mutable : std::true_type {}; template void test() { static_assert(std::is_same < typename gil::view_type < std::uint8_t, Layout, IsPlanar::value, IsStepX::value, IsMutable::value >::type, ResultView >::value, "view_type yields unexpected view"); } template void test_not() { static_assert(!std::is_same < typename gil::view_type < std::uint8_t, Layout, IsPlanar::value, IsStepX::value, IsMutable::value >::type, ResultView >::value, "view_type yields unexpected view"); } int main() { test(); test(); test(); test(); test_not(); test_not(); test_not(); test_not(); test(); test(); test(); test(); test_not(); test_not(); test(); test(); test(); test(); test(); test(); test(); test(); test_not(); test(); test(); test(); test(); test_not(); test_not(); test(); test(); test(); test(); test_not(); test_not(); test_not(); test(); test(); test(); test(); test(); test(); test(); test(); test_not(); test(); test(); test(); test(); }