equal
deleted
inserted
replaced
|
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/detail/workaround.hpp> |
|
9 |
|
10 namespace boost { namespace concept { |
|
11 |
|
12 # if BOOST_WORKAROUND(__GNUC__, == 2) |
|
13 |
|
14 # define BOOST_CONCEPT_USAGE(model) ~model() |
|
15 |
|
16 # else |
|
17 |
|
18 template <class Model> |
|
19 struct usage_requirements |
|
20 { |
|
21 ~usage_requirements() { ((Model*)0)->~Model(); } |
|
22 }; |
|
23 |
|
24 # if BOOST_WORKAROUND(__GNUC__, <= 3) |
|
25 |
|
26 # define BOOST_CONCEPT_USAGE(model) \ |
|
27 model(); /* at least 2.96 and 3.4.3 both need this :( */ \ |
|
28 BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \ |
|
29 ~model() |
|
30 |
|
31 # else |
|
32 |
|
33 # define BOOST_CONCEPT_USAGE(model) \ |
|
34 BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \ |
|
35 ~model() |
|
36 |
|
37 # endif |
|
38 |
|
39 # endif |
|
40 |
|
41 }} // namespace boost::concept |
|
42 |
|
43 #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP |