Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / gil / concepts / concept_check.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
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 #ifndef BOOST_GIL_CONCEPTS_CONCEPTS_CHECK_HPP
9 #define BOOST_GIL_CONCEPTS_CONCEPTS_CHECK_HPP
10
11 #include <boost/config.hpp>
12
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"
18 #endif
19
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"
25 #endif
26
27 #include <boost/concept_check.hpp>
28
29 #if defined(BOOST_CLANG)
30 #pragma clang diagnostic pop
31 #endif
32
33 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
34 #pragma GCC diagnostic pop
35 #endif
36
37 // TODO: Document BOOST_GIL_USE_CONCEPT_CHECK here
38
39 namespace boost { namespace gil {
40
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?
43
44 #ifdef BOOST_GIL_USE_CONCEPT_CHECK
45     #define GIL_CLASS_REQUIRE(type_var, ns, concept) \
46         BOOST_CLASS_REQUIRE(type_var, ns, concept);
47
48     template <typename Concept>
49     void gil_function_requires() { function_requires<Concept>(); }
50 #else
51     #define GIL_CLASS_REQUIRE(type_var, ns, concept)
52
53     template <typename C>
54     void gil_function_requires() {}
55 #endif
56
57 }} // namespace boost::gil:
58
59 #endif