3 ms·
Most STL containers with the default allocator will always initialise memory (some, like std::array, don't iirc). That's a feature. If you don't want it, then y
by lorenzhs 10y ago
Most STL containers with the default allocator will always initialise memory (some, like std::array, don't iirc). That's a feature. If you don't want it, then you'll have to use your own allocator or container. Both bring changes throughout the codebase, unfortunately.
- TillE 10y ago> Both bring changes throughout the codebase, unfortunately. That's where auto often helps. Lets you change types as long as you don't break the interface.