is_concept_equivalent.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*-----------------------------------------------------------------------------+
  2. Copyright (c) 2008-2009: Joachim Faulhaber
  3. +------------------------------------------------------------------------------+
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENCE.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. +-----------------------------------------------------------------------------*/
  8. #ifndef BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830
  9. #define BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830
  10. #include <boost/mpl/and.hpp>
  11. namespace boost{ namespace icl
  12. {
  13. template<template<class>class IsConcept, class LeftT, class RightT>
  14. struct is_concept_equivalent
  15. {
  16. typedef is_concept_equivalent<IsConcept, LeftT, RightT> type;
  17. BOOST_STATIC_CONSTANT(bool, value =
  18. (mpl::and_<IsConcept<LeftT>, IsConcept<RightT> >::value)
  19. );
  20. };
  21. template<template<class>class IsConcept, class LeftT, class RightT>
  22. struct has_same_concept
  23. {
  24. typedef has_same_concept<IsConcept, LeftT, RightT> type;
  25. BOOST_STATIC_CONSTANT(bool, value =
  26. (mpl::and_<IsConcept<LeftT>, is_concept_equivalent<IsConcept, LeftT, RightT> >::value)
  27. );
  28. };
  29. }} // namespace boost icl
  30. #endif