123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- #ifndef BOOST_URL_RFC_PCT_ENCODED_RULE_HPP
- #define BOOST_URL_RFC_PCT_ENCODED_RULE_HPP
- #include <boost/url/detail/config.hpp>
- #include <boost/url/error_types.hpp>
- #include <boost/url/pct_string_view.hpp>
- #include <boost/url/grammar/charset.hpp>
- namespace boost {
- namespace urls {
- #ifdef BOOST_URL_DOCS
- template<class CharSet>
- constexpr
- __implementation_defined__
- pct_encoded_rule( CharSet const& cs ) noexcept;
- #else
- template<class CharSet>
- struct pct_encoded_rule_t
- {
- using value_type = pct_string_view;
- template<class CharSet_>
- friend
- constexpr
- auto
- pct_encoded_rule(
- CharSet_ const& cs) noexcept ->
- pct_encoded_rule_t<CharSet_>;
- system::result<value_type>
- parse(
- char const*& it,
- char const* end) const noexcept;
- private:
- constexpr
- pct_encoded_rule_t(
- CharSet const& cs) noexcept
- : cs_(cs)
- {
- }
- CharSet cs_;
- };
- template<class CharSet>
- constexpr
- auto
- pct_encoded_rule(
- CharSet const& cs) noexcept ->
- pct_encoded_rule_t<CharSet>
- {
-
-
-
-
- static_assert(
- grammar::is_charset<CharSet>::value,
- "CharSet requirements not met");
- return pct_encoded_rule_t<CharSet>(cs);
- }
- #endif
- }
- }
- #include <boost/url/rfc/impl/pct_encoded_rule.hpp>
- #endif
|