template <typename T, size_t N, typename Allocator>
class small_vector {
union {
static_vector<T, N> inline;
std::vector<T, Allocator> heap;
} storage;
};

.... 🤔

Upside: easiest implementation of my life.

Downside: I have to store the discriminant outside the storage, so I can't know which is which without taking extra space for that.

@thephd I dare you to lay out static_vector such that vector’s size method returns the right value
@fay59 But that'd require me to match the standard library's layout and I dun wannnaaaa... especially if they put the capacity pointer first and not last!!