Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / core / image / concepts.cpp
1 //
2 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 // FIXME: Avoid Clang's flooding of non-disableable warnings like:
9 // "T does not declare any constructor to initialize its non-modifiable members"
10 // when compiling with concepts check enabled.
11 // See https://bugs.llvm.org/show_bug.cgi?id=41759
12 #if !defined(BOOST_GIL_USE_CONCEPT_CHECK) && !defined(__clang__)
13 #error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined
14 #endif
15 #include <boost/gil.hpp>
16
17 #include <boost/concept_check.hpp>
18
19 #include <array>
20
21 namespace gil = boost::gil;
22 using boost::function_requires;
23
24 int main()
25 {
26     function_requires<gil::ImageConcept<gil::gray8_image_t>>();
27     function_requires<gil::ImageConcept<gil::rgb8_image_t>>();
28
29     return 0;
30 }