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
7 # include <boost/concept/assert.hpp>
8 # include <boost/detail/workaround.hpp>
9 # include <boost/concept/detail/backward_compatibility.hpp>
11 namespace boost { namespace concepts {
13 # if BOOST_WORKAROUND(__GNUC__, == 2)
15 # define BOOST_CONCEPT_USAGE(model) ~model()
19 template <class Model>
20 struct usage_requirements
22 ~usage_requirements() { ((Model*)0)->~Model(); }
25 # if BOOST_WORKAROUND(__GNUC__, <= 3)
27 # define BOOST_CONCEPT_USAGE(model) \
28 model(); /* at least 2.96 and 3.4.3 both need this :( */ \
29 BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
34 # define BOOST_CONCEPT_USAGE(model) \
35 BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
42 }} // namespace boost::concepts
44 #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP