segmented_equal_to.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*=============================================================================
  2. Copyright (c) 2011 Eric Niebler
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_EQUAL_TO_HPP_INCLUDED)
  7. #define BOOST_FUSION_SEGMENTED_ITERATOR_EQUAL_TO_HPP_INCLUDED
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/mpl/and.hpp>
  10. #include <boost/mpl/bool.hpp>
  11. #include <boost/fusion/iterator/equal_to.hpp>
  12. namespace boost { namespace fusion
  13. {
  14. struct nil_;
  15. namespace detail
  16. {
  17. template <typename Stack1, typename Stack2>
  18. struct segmented_equal_to
  19. : mpl::and_<
  20. segmented_equal_to<
  21. typename Stack1::cdr_type,
  22. typename Stack2::cdr_type
  23. >
  24. , result_of::equal_to<
  25. typename Stack1::car_type::begin_type,
  26. typename Stack2::car_type::begin_type
  27. >
  28. >
  29. {};
  30. template <>
  31. struct segmented_equal_to<fusion::nil_, fusion::nil_>
  32. : mpl::true_
  33. {};
  34. }
  35. }}
  36. #endif