23 Aug
2022
23 Aug
'22
11:23 p.m.
On 24/08/2022 09:30, Vinnie Falco wrote:
Does set_port() taking a string_view fall into that category? Unlike other parts, port has special requirements on the string contents that cannot be satisfied by pct-encoding.
Yeah, we have a problem here. It sounds like we need to design an extra set functions. Maybe:
url_base& url_base::set_port( string_view ); // throws
result<void> url_base::try_set_port( string_view ); // returns result
what do you think about that?
Why is it a string at all? Shouldn't it be exclusively a uint16_t? Are there any cases where anything else is valid?