eval_later_result.hpp 894 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BOOST_METAPARSE_V1_CPP11_IMPL_EVAL_LATER_RESULT_HPP
  2. #define BOOST_METAPARSE_V1_CPP11_IMPL_EVAL_LATER_RESULT_HPP
  3. // Copyright Abel Sinkovics ([email protected]) 2017.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <boost/metaparse/v1/get_position.hpp>
  8. #include <boost/mpl/eval_if.hpp>
  9. #include <boost/mpl/less.hpp>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. namespace impl
  17. {
  18. template <class R1, class R2>
  19. struct eval_later_result :
  20. boost::mpl::eval_if<
  21. typename boost::mpl::less<
  22. typename get_position<R2>::type,
  23. typename get_position<R1>::type
  24. >::type,
  25. R1,
  26. R2
  27. >
  28. {};
  29. }
  30. }
  31. }
  32. }
  33. #endif