9 Dec
2013
9 Dec
'13
12:16 p.m.
On Monday 09 December 2013 14:02:12 Peter Dimov wrote:
Antony Polukhin вроте:
However this: * breaks ABI (now variant is declared as `template
class variant`) Why not just template
class variant? It's true that the degenerate case of variant<> isn't particularly useful, but then again, neither is the singular case of variant<X>. Is there a good reason to prohibit variant<>?
What should be the storage for such a variant then? Also, most of the interface of variant<> becomes invalid (e.g. type(), which(), assignment from elements, apply_visitor()). With such drastic interface differences, there should be a compelling reason to have such a specialization, and I don't see one.