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