My question is related to using s suffix in C ++?
Sample code using the suffix "s":
auto hello = "Hello!"s;
The same can be written like this:
auto hello = std::string{"Hello!"};
I was able to find on the Internet that the suffix "s" should be used to minimize errors and to clarify our intentions in the code.
Therefore, is the suffix "s" read-only? Or are there other benefits to using it?
c ++ stdstring auto c ++ 17
Rpessoa
source share