Niall Douglas wrote:
You seem very wedded to not breaking out single_buffer_variant and double_buffer_variant Peter. You seem keen we should accept your preferred mix of when each ought to be employed using your hardcoded logic. Can I ask why?
I don't have a good answer to this question. Breaking out into two separate
classes per number of buffers seems sensible and straightforward, and I
don't have any waterproof arguments against it apart from the fact that I
intuitively dislike it.
I prefer having a single variant, named "variant", which is almost always a
drop-in replacement for std::variant, for the fairly obvious reason that (a)
it's easy to recommend to users: just use variant2::variant instead of
std::variant, and your problems will be gone (not valid in all
jurisdictions) and (b) it would be possible, in theory, to one day replace
std::variant with it.
For people who'd rather have single_buffer_variant