Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2022-08-23 23:23:36

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?

Boost list run by bdawes at, gregod at, cpdaniel at, john at