Y
Hacker News
new
|
ask
|
show
|
jobs
by
breuwi
74 days ago
[Deleted, misread]
2 comments
Matheus28
74 days ago
Since C++11, data() is also required to be null terminated. Per your own source and cppreference.
link
breuwi
74 days ago
LOL, I need to learn to click on the more modern tabs. Will delete comment.
link
beached_whale
74 days ago
std::string since C++ 11 guarantees the buffer is zero terminated. The reasoning being thread safety of const members.
https://eel.is/c++draft/basic.string#general-3
link