borland.hpp 983 B

123456789101112131415161718192021222324252627282930
  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_DETAIL_BORLAND_DWA2006429_HPP
  5. # define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
  6. # include <boost/preprocessor/cat.hpp>
  7. # include <boost/concept/detail/backward_compatibility.hpp>
  8. namespace boost { namespace concepts {
  9. template <class ModelFnPtr>
  10. struct require;
  11. template <class Model>
  12. struct require<void(*)(Model)>
  13. {
  14. enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
  15. };
  16. # define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
  17. enum \
  18. { \
  19. BOOST_PP_CAT(boost_concept_check,__LINE__) = \
  20. boost::concepts::require<ModelFnPtr>::instantiate \
  21. }
  22. }} // namespace boost::concept
  23. #endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP