2
0
mirror of https://github.com/boostorg/url.git synced 2026-02-16 01:42:17 +00:00

elements are not stream parsers

This commit is contained in:
Vinnie Falco
2021-09-03 17:35:07 -07:00
parent 5860390271
commit b599ffa4af
24 changed files with 115 additions and 371 deletions

View File

@@ -40,6 +40,10 @@ public:
string_view question = "?";
string_view colon = ":";
string_view slash = "/";
string_view alnum =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789";
string_view at = "@";
v = {};
@@ -49,7 +53,8 @@ public:
for(std::uint8_t c : question) v[c] |= 0x08;
for(std::uint8_t c : colon) v[c] |= 0x10;
for(std::uint8_t c : slash) v[c] |= 0x20;
for(std::uint8_t c : at) v[c] |= 0x40;
for(std::uint8_t c : alnum) v[c] |= 0x40;
for(std::uint8_t c : at) v[c] |= 0x80;
}
void
@@ -133,6 +138,12 @@ public:
slash_char_mask>(),
"/");
check(masked_char_set<
alnum_char_mask>(),
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789");
check(masked_char_set<
question_char_mask>(),
"?");