Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2021-10-15 16:34:40


On Fri, Oct 15, 2021 at 9:04 AM Rainer Deyke via Boost
<boost_at_[hidden]> wrote:
> The following would do the trick:
>
> auto u1 = parse_relative_ref<url_view>( "/" ).value();
> auto u2 = parse_relative_ref<url>( "/" ).value();
> auto u3 = parse_relative_ref<static_url<1024>>( "/" ).value();
> auto u4 = parse_relative_ref<pmr_url>( "/" ).value();
> auto u5 = parse_relative_ref<dynamic_url<
> std::allocator<char>>>( "/" ).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.

Thanks


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk