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 All the destructor/copy/move stuff is still pretty annoying to implement though
@lesley
... or you can use std::variant, which should do that for you.
@thephd
@dermojo @lesley You can, and I should, but in the end I'll just manually implement the scratch space and use fancy discriminator rules.