|
|
|
|
|
by mananaysiempre
677 days ago
|
|
I was observing that `p (const char *)str` also worked in my experiment, but I’m far from a C++ expert and upon double-checking this seems to have been more of an accident than intended behaviour, because there is no operator const_pointer in basic_string that I can find. Definitely use `p str.c_str()`. |
|
Some implementations even put char[0] at the first byte in the optimized form.