Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-12 09:07:48

0001 //
0002 // Copyright (c) 2021 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/url
0008 //
0009 
0010 #ifndef BOOST_URL_GRAMMAR_VCHARS_HPP
0011 #define BOOST_URL_GRAMMAR_VCHARS_HPP
0012 
0013 #include <boost/url/detail/config.hpp>
0014 #include <boost/url/grammar/detail/charset.hpp>
0015 
0016 namespace boost {
0017 namespace urls {
0018 namespace grammar {
0019 namespace implementation_defined {
0020 struct vchars_t
0021 {
0022     constexpr
0023     bool
0024     operator()(char c) const noexcept
0025     {
0026         return c >= 0x21 && c <= 0x7e;
0027     }
0028 
0029 #ifdef BOOST_URL_USE_SSE2
0030     char const*
0031     find_if(
0032         char const* first,
0033         char const* last) const noexcept
0034     {
0035         return detail::find_if_pred(
0036             *this, first, last);
0037     }
0038 
0039     char const*
0040     find_if_not(
0041         char const* first,
0042         char const* last) const noexcept
0043     {
0044         return detail::find_if_not_pred(
0045             *this, first, last);
0046     }
0047 #endif
0048 };
0049 } // implementation_defined
0050 
0051 /** The set of visible characters
0052 
0053     @par Example
0054     Character sets are used with rules and the
0055     functions @ref find_if and @ref find_if_not.
0056     @code
0057     system::result< core::string_view > rv = parse( "JohnDoe", token_rule( vchars ) );
0058     @endcode
0059 
0060     @par BNF
0061     @code
0062     VCHAR       = 0x21-0x7E
0063                 ; visible (printing) characters
0064     @endcode
0065 
0066     @par Specification
0067     @li <a href="https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1"
0068         >B.1. Core Rules (rfc5234)</a>
0069 
0070     @see
0071         @ref find_if,
0072         @ref find_if_not,
0073         @ref parse,
0074         @ref token_rule.
0075 */
0076 constexpr implementation_defined::vchars_t vchars{};
0077 
0078 } // grammar
0079 } // urls
0080 } // boost
0081 
0082 #endif