12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef BOOST_URL_GRAMMAR_IMPL_NOT_EMPTY_RULE_HPP
- #define BOOST_URL_GRAMMAR_IMPL_NOT_EMPTY_RULE_HPP
- #include <boost/url/grammar/error.hpp>
- #include <boost/url/grammar/parse.hpp>
- namespace boost {
- namespace urls {
- namespace grammar {
- template<class R>
- auto
- not_empty_rule_t<R>::
- parse(
- char const*& it,
- char const* end) const ->
- system::result<value_type>
- {
- if(it == end)
- {
-
- BOOST_URL_RETURN_EC(
- error::mismatch);
- }
- auto const it0 = it;
- auto rv = r_.parse(it, end);
- if( !rv )
- {
-
- return rv;
- }
- if(it == it0)
- {
-
- BOOST_URL_RETURN_EC(
- error::mismatch);
- }
-
- return rv;
- }
- }
- }
- }
- #endif
|