borland.hpp 921 B

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