File indexing completed on 2025-09-15 08:53:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_URL_GRAMMAR_IMPL_NOT_EMPTY_RULE_HPP
0011 #define BOOST_URL_GRAMMAR_IMPL_NOT_EMPTY_RULE_HPP
0012
0013 #include <boost/url/grammar/error.hpp>
0014 #include <boost/url/grammar/parse.hpp>
0015
0016 namespace boost {
0017 namespace urls {
0018 namespace grammar {
0019
0020 namespace implementation_defined {
0021 template<class R>
0022 auto
0023 not_empty_rule_t<R>::
0024 parse(
0025 char const*& it,
0026 char const* end) const ->
0027 system::result<value_type>
0028 {
0029 if(it == end)
0030 {
0031
0032 BOOST_URL_RETURN_EC(
0033 error::mismatch);
0034 }
0035 auto const it0 = it;
0036 auto rv = r_.parse(it, end);
0037 if( !rv )
0038 {
0039
0040 return rv;
0041 }
0042 if(it == it0)
0043 {
0044
0045 BOOST_URL_RETURN_EC(
0046 error::mismatch);
0047 }
0048
0049 return rv;
0050 }
0051 }
0052
0053 }
0054 }
0055 }
0056
0057 #endif