A template for implementation of clause that checks and handles presence of optional entity in the input stream.
More...
template<typename Subitems_Tuple>
class restinio::easy_parser::impl::maybe_clause_t< Subitems_Tuple >
A template for implementation of clause that checks and handles presence of optional entity in the input stream.
This template implements rules like:
T := [ A B C ]
- Note
- The copy of Target_Type object passed to
try_process
method is created before checking the presence of subitems. If all subitems are found then the value of that temporary object moved back to target parameter of try_process
method.
-
This clause always returns success even if nothing has been consumed from the input stream.
- Template Parameters
-
Subitems_Tuple | the type of std::tuple with items for every clause to be checked. |
- Since
- v.0.6.1
Definition at line 1716 of file easy_parser.hpp.