Is it possible to initialize string with specific capacity?



  • TyRoXx schrieb:

    Nathan schrieb:

    §21.4.1/4 schrieb:

    [...]Every object of type basic_string<charT,traits, Allocator> shall use an object of type Allocator to allocate and free storage for the contained charT objects as needed.

    Das verbietet SSO. Und jetzt?

    Nein? Es sagt nur das, wenn man Speicher braucht drn Allokator nutzen soll.
    Bei SSO braucht man keinen.


Anmelden zum Antworten