Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2022-08-23 21:32:45


On Tue, Aug 23, 2022 at 2:30 PM Vinnie Falco <vinnie.falco_at_[hidden]> wrote:
> > If you used result<>, you would lose the ability to chain the setters.
>
> Yeah... well, I think I'm OK with that.

If you chain the setters then how can you look at the result to see if
it failed? Anyway.. I thought of a solution:

    result< url_base& > url_base::set_port( string_view s );

now you can write

    url().set_port( "8080" )->set_encoded_host( "www.example.com"
)->set_path( "/" )

Regards


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