
Nathan Ridge wrote:
After reading this thread again, it seems to me that the reason we can't reach an agreement is that different people are proposing two fundamentally different ways of using static_vector:
1) As a variant of [std|boost]::array where not all the elements are constructed/used at the same time, and which keeps track of how many elements are currently in use.
Can you please give some examples of such use?
Another example would be the underlying data structure for a circular buffer whose maximum size is known at compile time.
As a container for storing some number of pointers/iterators/ids/etc. to/of children nodes in a node of some tree structure. This number of course must be known at compile time. E.g. in every variation of a B-tree, including all spatial indexes based on a rtree. Regards, Adam