foldl_reject_incomplete1.hpp 950 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef BOOST_METAPARSE_V1_FOLDL_REJECT_INCOMPLETE1_HPP
  2. #define BOOST_METAPARSE_V1_FOLDL_REJECT_INCOMPLETE1_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
  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/foldl_reject_incomplete.hpp>
  8. #include <boost/mpl/if.hpp>
  9. namespace boost
  10. {
  11. namespace metaparse
  12. {
  13. namespace v1
  14. {
  15. template <class P, class State, class ForwardOp>
  16. struct foldl_reject_incomplete1
  17. {
  18. typedef foldl_reject_incomplete1 type;
  19. template <class S, class Pos>
  20. struct apply :
  21. boost::mpl::if_<
  22. is_error<typename P::template apply<S, Pos> >,
  23. P,
  24. foldl_reject_incomplete<P, State, ForwardOp>
  25. >::type::template apply<S, Pos>
  26. {};
  27. };
  28. }
  29. }
  30. }
  31. #endif