
26 Sep
2025
26 Sep
'25
2:24 p.m.
Julien Blanc wrote:
Le 2025-09-26 12:31, Peter Dimov via Boost a écrit :
The idea that we're somehow delivering enormous value by making it clear that the parameter is not a pointer to a single `char` is misguided; pointers to a single `char` are so rare that a `char const*` is essentially an idiomatic way to denote a null terminated char sequence. Its downside is not lack of type safety.
Alas `char const*` is also an idiomatic way to point at a bunch of raw bytes, whose size is given elsewhere, and clearly are not null terminated.
Common (unfortunately), maybe. Idiomatic... maybe not so much. :-)