Chris@16: // Copyright David Abrahams 2006. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: #ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP Chris@16: # define BOOST_CONCEPT_ASSERT_DWA2006430_HPP Chris@16: Chris@16: # include Chris@16: # include Chris@16: Chris@16: // The old protocol used a constraints() member function in concept Chris@16: // checking classes. If the compiler supports SFINAE, we can detect Chris@16: // that function and seamlessly support the old concept checking Chris@16: // classes. In this release, backward compatibility with the old Chris@16: // concept checking classes is enabled by default, where available. Chris@16: // The old protocol is deprecated, though, and backward compatibility Chris@16: // will no longer be the default in the next release. Chris@16: Chris@16: # if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ Chris@16: && !defined(BOOST_NO_SFINAE) \ Chris@16: \ Chris@101: && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) Chris@16: Chris@16: // Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to Chris@16: // check for the presence of particularmember functions. Chris@16: Chris@16: # define BOOST_OLD_CONCEPT_SUPPORT Chris@16: Chris@16: # endif Chris@16: Chris@16: # ifdef BOOST_MSVC Chris@16: # include Chris@16: # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) Chris@16: # include Chris@16: # else Chris@16: # include Chris@16: # endif Chris@16: Chris@16: // Usage, in class or function context: Chris@16: // Chris@16: // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); Chris@16: // Chris@16: # define BOOST_CONCEPT_ASSERT(ModelInParens) \ Chris@16: BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) Chris@16: Chris@16: #endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP