reject.qbk 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [#reject]
  2. [section reject]
  3. [h1 Synopsis]
  4. template <class Msg, class Pos>
  5. struct reject;
  6. This is a [link metaprogramming_value template metaprogramming value].
  7. [table Arguments
  8. [[Name] [Type]]
  9. [[`Msg`] [[link metaprogramming_value template metaprogramming value]]]
  10. [[`Pos`] [[link source_position source position]]]
  11. ]
  12. [h1 Description]
  13. Values representing a failed parser application. It behaves as a
  14. [link lazy_metafunction lazy template metafunction]: when it is evaluated as a
  15. metafunction, it returns itself with its arguments evaluated. See expression
  16. semantics for further details.
  17. [note
  18. Note that for backward compatibility when `Msg::type` is not defined,
  19. `reject<....>::type` does not evaluate `Msg`. For example
  20. `reject<int, start>::type` is `reject<int, start::type>`. Using types that are
  21. not template metaprogramming values as `Msg` is deprecated and will not work
  22. in future versions of the library.
  23. ]
  24. [h1 Expressions semantics]
  25. For any `m` template metaprogramming value and `p` source position the following
  26. are equivalent:
  27. reject<m, p>::type
  28. reject<m, p::type>
  29. [h1 Header]
  30. #include <boost/metaparse/reject.hpp>
  31. [h1 Operations]
  32. * [link get_position `get_position`]
  33. * [link get_message `get_message`]
  34. [endsect]