concepts.cpp 895 B

123456789101112131415161718192021222324252627282930
  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. #include <boost/concept_check.hpp>
  17. #include <array>
  18. namespace gil = boost::gil;
  19. using boost::function_requires;
  20. int main()
  21. {
  22. function_requires<gil::ImageConcept<gil::gray8_image_t>>();
  23. function_requires<gil::ImageConcept<gil::rgb8_image_t>>();
  24. return 0;
  25. }