On 15.10.21 18:34, Vinnie Falco via Boost wrote:
On Fri, Oct 15, 2021 at 9:04 AM Rainer Deyke via Boost
wrote: The following would do the trick:
auto u1 = parse_relative_ref
( "/" ).value(); auto u2 = parse_relative_ref<url>( "/" ).value(); auto u3 = parse_relative_ref >( "/" ).value(); auto u4 = parse_relative_ref ( "/" ).value(); auto u5 = parse_relative_ref >( "/" ).value(); Yeah, kinda. This is not expert friendly but also, does not accommodate this use-case:
struct connection { url u_;
void process( string_view s ) { u_ = parse_uri( s ); ... } };
In the code above, the capacity for u_ is reused for each I/O cycle.
You can always do this:
struct connection {
url u_;
void process( string_view s )
{
u_ = parse_uri