1 // Copyright David Abrahams 2006. Distributed under the Boost 2 // Software License, Version 1.0. (See accompanying 3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 #ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP 5 # define BOOST_CONCEPT_USAGE_DWA2006919_HPP 6 7 # include <boost/concept/assert.hpp> 8 # include <boost/config/workaround.hpp> 9 # include <boost/concept/detail/backward_compatibility.hpp> 10 11 namespace boost { namespace concepts { 12 13 template <class Model> 14 struct usage_requirements 15 { 16 # if defined(BOOST_GCC) && (BOOST_GCC >= 110000) 17 # pragma GCC diagnostic push 18 //# pragma GCC diagnostic ignored "-Wnonnull" 19 # endif ~usage_requirementsboost::concepts::usage_requirements20 ~usage_requirements() { ((Model*)0)->~Model(); } 21 # if defined(BOOST_GCC) && (BOOST_GCC >= 110000) 22 # pragma GCC diagnostic pop 23 # endif 24 }; 25 26 # if BOOST_WORKAROUND(__GNUC__, <= 3) 27 28 # define BOOST_CONCEPT_USAGE(model) \ 29 model(); /* at least 2.96 and 3.4.3 both need this :( */ \ 30 BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \ 31 ~model() 32 33 # else 34 35 # define BOOST_CONCEPT_USAGE(model) \ 36 BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \ 37 ~model() 38 39 # endif 40 41 }} // namespace boost::concepts 42 43 #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP 44