Ralf Jung
Ralf Jung
So just having rule (1) would mean if there is a ptr (value) that is not of type `&T`, that's an error? I think for an analysis like this, we...
> but how do we ensure that a private &T field in a type is not also accepted? I think we can have a privacy-sensitive value visitor. > but not...
The key requirements seem to be > We therefore propose that a non-transient constexpr allocation be a valid result for a constexpr variable initializer if: > > * the result...
@ubsan > These are specifically for `constexpr` variables, which are variables which live in read only memory. Oh, so there are special global variables like this that you can only...
> `constinit auto x = ...; // this variable is initialized at compile time` If the initializer involves non-transient allocations, @gnzlbg said above that they would become run-time allocations. How...
> If you then use that to initialize a static, then the copy constructor is invoked AFAICT, which can heap allocate at run-time, and copy the memory from the static...
So from what @gnzlbg said on Zulip, it seems non-transient constexpr allocations did not make it for C++20, while transient allocations did. And indeed, there is very little concern with...
I like the idea of using a trait or two to make the programmer opt in to this explicitly! I think to follow this approach, we should figure out *what...
> All Freeze types are safe to memcpy as long as the memcpy's capture the lifetime of the value immutably, and all memcpy's are forgotten before the original value is...
> Is there any reason we need to treat heap allocations differently except maybe user expectations? For that one we can argue that it is mutating through a pointer obtained...