Created on 2016-11-10.00:00:00 last changed 96 months ago
[ Issues Telecon 16-Dec-2016 ]
Resolved by the adoption of P0501R0.
Addresses CH 3, CH 4, CH 5, CH 6, CH 8
variant allows reference types as alternatives; optional explicitly forbids to be instantiated for reference types. This is inconsistent.
variant<int, void> should be as usable as variant<int>.
variant<> should not have an index() function.
Clarify the intended behavior of variant for alternative types that are references.
Clarify variant construction.
Proposed change:
Consider allowing reference types for both or none.
—
Consider specifying a specialization for variant<> like:
template<> class variant<> { public: variant() = delete; variant(const variant&) = delete; variant& operator=(variant const&) = delete; };
Add a respective note.
Add a note that variant<> cannot be constructed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2016-12-16 20:56:38 | admin | set | messages: + msg8736 |
2016-12-16 20:56:38 | admin | set | status: new -> resolved |
2016-11-10 00:00:00 | admin | create |