Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gameman144
on Oct 14, 2023
|
parent
|
context
|
favorite
| on:
Escape analysis hates copy elision (2021)
Isn't that expected since 'y' is still non-const though? In your example, I'd expect 'x' to not escape, since a const-cast of it is undefined.
celrod
on Oct 14, 2023
[–]
Unfortunately, `x` does escape, merely because we initialized it via assigning to it from a non-const.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: