C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Class Instance Re-Use/Re-Init

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Tue, 16 Aug 2022 16:29:26 +0200
On 16/08/2022 13:03, Avi Kivity via Std-Proposals wrote:
> I like std::take(). I use std::exchange(x, {}) quite a lot.

Indeed I've found that it's the most common form of usage of
std::exchange in practice, thus my take() proposal. Some numbers:

> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2226r0.html#motivation

Thanks,
-- 
Giuseppe D'Angelo

Received on 2022-08-16 14:29:29