Boost GIL


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 "-Wfloat-equal"
16 #pragma clang diagnostic ignored "-Wuninitialized"
17 #endif
18 
19 #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Wfloat-equal"
22 #pragma GCC diagnostic ignored "-Wuninitialized"
23 #endif
24 
25 #include <boost/concept_check.hpp>
26 
27 #if defined(BOOST_CLANG)
28 #pragma clang diagnostic pop
29 #endif
30 
31 #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
32 #pragma GCC diagnostic pop
33 #endif
34 
35 // TODO: Document BOOST_GIL_USE_CONCEPT_CHECK here
36 
37 namespace boost { namespace gil {
38 
39 // TODO: What is GIL_CLASS_REQUIRE for; Why not use BOOST_CLASS_REQUIRE?
40 // TODO: What is gil_function_requires for; Why not function_requires?
41 
42 #ifdef BOOST_GIL_USE_CONCEPT_CHECK
43  #define GIL_CLASS_REQUIRE(type_var, ns, concept) \
44  BOOST_CLASS_REQUIRE(type_var, ns, concept);
45 
46  template <typename Concept>
47  void gil_function_requires() { function_requires<Concept>(); }
48 #else
49  #define GIL_CLASS_REQUIRE(type_var, ns, concept)
50 
51  template <typename C>
52  void gil_function_requires() {}
53 #endif
54 
55 }} // namespace boost::gil:
56 
57 #endif
Definition: algorithm.hpp:30