123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef BOOST_URL_GRAMMAR_NOT_EMPTY_RULE_HPP
- #define BOOST_URL_GRAMMAR_NOT_EMPTY_RULE_HPP
- #include <boost/url/detail/config.hpp>
- #include <boost/url/error_types.hpp>
- #include <boost/url/grammar/type_traits.hpp>
- namespace boost {
- namespace urls {
- namespace grammar {
- #ifdef BOOST_URL_DOCS
- template<class Rule>
- constexpr
- __implementation_defined__
- not_empty_rule( Rule r );
- #else
- template<class R>
- struct not_empty_rule_t
- {
- using value_type =
- typename R::value_type;
- auto
- parse(
- char const*& it,
- char const* end) const ->
- system::result<value_type>;
- template<class R_>
- friend
- constexpr
- auto
- not_empty_rule(
- R_ const& r) ->
- not_empty_rule_t<R_>;
- private:
- constexpr
- not_empty_rule_t(
- R const& r) noexcept
- : r_(r)
- {
- }
- R r_;
- };
- template<class Rule>
- auto
- constexpr
- not_empty_rule(
- Rule const& r) ->
- not_empty_rule_t<Rule>
- {
-
-
-
-
- static_assert(
- is_rule<Rule>::value,
- "Rule requirements not met");
- return { r };
- }
- #endif
- }
- }
- }
- #include <boost/url/grammar/impl/not_empty_rule.hpp>
- #endif
|