Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-05 Thread Jonathan Wakely
On 03/04/19 17:25 +0100, Jonathan Wakely wrote: Avoid creating arbitrarily large objects on the stack when creating temporaries in order to provide the strong exception-safety guarantee. Also implement Antony Polukhin's suggestion to whitelist specific types that can be efficiently move-assigned

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-04 Thread Jonathan Wakely
On 03/04/19 23:27 +0100, Jonathan Wakely wrote: On 03/04/19 23:32 +0300, Antony Polukhin wrote: Looks good. Covers most of the use cases. Please consider adding filesystem::path, pair, tuple, string_view?, string_view is trivially_copyable, and < 256 bytes, so works automatically. error_cod

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Antony Polukhin
On Wed, Apr 3, 2019, 23:39 Ville Voutilainen wrote: > On Wed, 3 Apr 2019 at 23:32, Antony Polukhin wrote: > > > > Looks good. Covers most of the use cases. > > > > Please consider adding filesystem::path, pair, tuple, string_view?, > error_code, list, deque (myabe all the other containers), opti

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Jonathan Wakely
On 03/04/19 23:39 +0300, Ville Voutilainen wrote: On Wed, 3 Apr 2019 at 23:32, Antony Polukhin wrote: Looks good. Covers most of the use cases. Please consider adding filesystem::path, pair, tuple, string_view?, error_code, list, deque (myabe all the other containers), optional, variant itse

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Jonathan Wakely
On 03/04/19 23:32 +0300, Antony Polukhin wrote: Looks good. Covers most of the use cases. Please consider adding filesystem::path, pair, tuple, string_view?, string_view is trivially_copyable, and < 256 bytes, so works automatically. error_code, list, deque (myabe all the other containers),

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Ville Voutilainen
On Wed, 3 Apr 2019 at 23:32, Antony Polukhin wrote: > > Looks good. Covers most of the use cases. > > Please consider adding filesystem::path, pair, tuple, string_view?, > error_code, list, deque (myabe all the other containers), optional, variant > itself (for cases when variant holds another v

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Antony Polukhin
Looks good. Covers most of the use cases. Please consider adding filesystem::path, pair, tuple, string_view?, error_code, list, deque (myabe all the other containers), optional, variant itself (for cases when variant holds another variant). It would be very useful for the _Never_valueless_alt to

[PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-03 Thread Jonathan Wakely
Avoid creating arbitrarily large objects on the stack when creating temporaries in order to provide the strong exception-safety guarantee. Also implement Antony Polukhin's suggestion to whitelist specific types that can be efficiently move-assigned, so that emplacing those types never causes a va