Subject: Re: when to std::launder
From: Nicolas Lesser (blitzrakete_at_[hidden])
Date: 2019-04-29 10:38:58
Larry Evans via Std-Discussion wrote:
> Hi Nicolas,
> On 4/29/19 7:14 AM, Nicolas Lesser via Std-Discussion wrote:
> > char buffer[sizeof(C)]; is not reassignable.
> That's an example of something that has some property,
> that's not a definition of that property.
> For example, is:
> char buffer; also not reassignable?
> showed no occurrence of reassignable.
> Could you please define more specifically what "reassignable" means?
> > On Mon, Apr 29, 2019, 12:07 PM Mohamed Khaled <mkmostafa92_at_[hidden]> wrote:
> >> what does "and/or not reassignable buffer" mean?
> Std-Discussion mailing list
Oh sorry, I thought it was clear. It's not an official term AFAIK. It just means that you can't reassign the variable, since you can't assign an array to another array. Basically you can't assign it another value (deleting the assignment operator would also make a type not reassignable). In this case, the new object is accessible through the result of placement new, but if you use a C style array as buffer, then you can't assign the result to that array.
Hope that makes sense :) sorry
-- - Nicolas
STD-DISCUSSION list run by herb.sutter at gmail.com
Older Archives on Google Groups