2 // Copyright 2005-2007 Adobe Systems Incorporated
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
8 #ifndef BOOST_GIL_CONCEPTS_CONCEPTS_CHECK_HPP
9 #define BOOST_GIL_CONCEPTS_CONCEPTS_CHECK_HPP
11 #include <boost/config.hpp>
13 #if defined(BOOST_CLANG)
14 #pragma clang diagnostic push
15 #pragma clang diagnostic ignored "-Wconversion"
16 #pragma clang diagnostic ignored "-Wfloat-equal"
17 #pragma clang diagnostic ignored "-Wuninitialized"
20 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
21 #pragma GCC diagnostic push
22 #pragma GCC diagnostic ignored "-Wconversion"
23 #pragma GCC diagnostic ignored "-Wfloat-equal"
24 #pragma GCC diagnostic ignored "-Wuninitialized"
27 #include <boost/concept_check.hpp>
29 #if defined(BOOST_CLANG)
30 #pragma clang diagnostic pop
33 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
34 #pragma GCC diagnostic pop
37 // TODO: Document BOOST_GIL_USE_CONCEPT_CHECK here
39 namespace boost { namespace gil {
41 // TODO: What is GIL_CLASS_REQUIRE for; Why not use BOOST_CLASS_REQUIRE?
42 // TODO: What is gil_function_requires for; Why not function_requires?
44 #ifdef BOOST_GIL_USE_CONCEPT_CHECK
45 #define GIL_CLASS_REQUIRE(type_var, ns, concept) \
46 BOOST_CLASS_REQUIRE(type_var, ns, concept);
48 template <typename Concept>
49 void gil_function_requires() { function_requires<Concept>(); }
51 #define GIL_CLASS_REQUIRE(type_var, ns, concept)
54 void gil_function_requires() {}
57 }} // namespace boost::gil: