Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
phire
on Sept 9, 2023
|
parent
|
context
|
favorite
| on:
Just how constexpr is C++20’s std:string?
I'm guessing the string was part of a larger struct, and they wanted to clear the entire struct with a single memset.
It's a somewhat common pattern in C, but requires care.
rewmie
on Sept 9, 2023
|
next
[–]
> It's a somewhat common pattern in C (...)
C++ isn't C, though.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
It's a somewhat common pattern in C, but requires care.