Chris@16
|
1 // Copyright David Abrahams 2006. Distributed under the Boost
|
Chris@16
|
2 // Software License, Version 1.0. (See accompanying
|
Chris@16
|
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
4 #ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|
Chris@16
|
5 # define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|
Chris@16
|
6
|
Chris@16
|
7 # include <boost/config.hpp>
|
Chris@16
|
8 # include <boost/detail/workaround.hpp>
|
Chris@16
|
9
|
Chris@16
|
10 // The old protocol used a constraints() member function in concept
|
Chris@16
|
11 // checking classes. If the compiler supports SFINAE, we can detect
|
Chris@16
|
12 // that function and seamlessly support the old concept checking
|
Chris@16
|
13 // classes. In this release, backward compatibility with the old
|
Chris@16
|
14 // concept checking classes is enabled by default, where available.
|
Chris@16
|
15 // The old protocol is deprecated, though, and backward compatibility
|
Chris@16
|
16 // will no longer be the default in the next release.
|
Chris@16
|
17
|
Chris@16
|
18 # if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
|
Chris@16
|
19 && !defined(BOOST_NO_SFINAE) \
|
Chris@16
|
20 \
|
Chris@101
|
21 && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4))
|
Chris@16
|
22
|
Chris@16
|
23 // Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
|
Chris@16
|
24 // check for the presence of particularmember functions.
|
Chris@16
|
25
|
Chris@16
|
26 # define BOOST_OLD_CONCEPT_SUPPORT
|
Chris@16
|
27
|
Chris@16
|
28 # endif
|
Chris@16
|
29
|
Chris@16
|
30 # ifdef BOOST_MSVC
|
Chris@16
|
31 # include <boost/concept/detail/msvc.hpp>
|
Chris@16
|
32 # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
Chris@16
|
33 # include <boost/concept/detail/borland.hpp>
|
Chris@16
|
34 # else
|
Chris@16
|
35 # include <boost/concept/detail/general.hpp>
|
Chris@16
|
36 # endif
|
Chris@16
|
37
|
Chris@16
|
38 // Usage, in class or function context:
|
Chris@16
|
39 //
|
Chris@16
|
40 // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
|
Chris@16
|
41 //
|
Chris@16
|
42 # define BOOST_CONCEPT_ASSERT(ModelInParens) \
|
Chris@16
|
43 BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
|
Chris@16
|
44
|
Chris@16
|
45 #endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|