What is the smallest #cplusplus "full" vector/dynamic_array class you've ever seen/made?
Been awhile since I wrote one, but I needed to and was surprised at how small it is. 150 LOC. Supports custom allocators, copy/move, all the usuals.
Nothing *preventing* per-se, but there are reasons. 1) Targeting exotic platforms, meaning stl implementation can vary quite a bit; can't rely on consistency. 2) Targeting embedded systems, so executable size matters.
-
-
Sorry, preventing is the wrong word. Yeah, these were the kinds of reasons I guessed.
-
A good dynamic array class is also a foundational container to have. Can implement lots of other containers using an array internally. Some containers which the stl doesn't have (or implements poorly/too generically).
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.