24 Aug
2022
24 Aug
'22
6:47 a.m.
Vinnie Falco wrote:
On Tue, Aug 23, 2022 at 2:30 PM Vinnie Falco
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( "/" )
That's not going to work because op-> is unchecked.