pchars.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/url
  8. //
  9. #ifndef BOOST_URL_RFC_PCHARS_HPP
  10. #define BOOST_URL_RFC_PCHARS_HPP
  11. #include <boost/url/detail/config.hpp>
  12. #include <boost/url/rfc/sub_delim_chars.hpp>
  13. #include <boost/url/rfc/unreserved_chars.hpp>
  14. namespace boost {
  15. namespace urls {
  16. /** The path character set
  17. @par Example
  18. Character sets are used with rules and
  19. the functions @ref grammar::find_if and
  20. @ref grammar::find_if_not.
  21. @code
  22. system::result< decode_view > rv = grammar::parse( "Program%20Files", pchars );
  23. @endcode
  24. @par BNF
  25. @code
  26. pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
  27. @endcode
  28. @par Specification
  29. @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.3"
  30. >3.3. Path (rfc3986)</a>
  31. @see
  32. @ref grammar::find_if,
  33. @ref grammar::find_if_not,
  34. @ref grammar::parse,
  35. @ref pct_encoded_rule.
  36. */
  37. constexpr auto pchars =
  38. unreserved_chars + sub_delim_chars + ':' + '@';
  39. } // urls
  40. } // boost
  41. #endif