Created on 2018-01-23.00:00:00 last changed 44 months ago
Proposed resolution:
This wording is relative to N4727.
Modify [variant.visit] as indicated:
template<class Visitor, class... Variants> constexpr see below visit(Visitor&& vis, Variants&&... vars);[…]
-4- Throws: bad_variant_access if
any variant in vars is valueless_by_exception()(vars.valueless_by_exception() || ...) is true.-5- Complexity: […]
-?- Remarks: This function shall not participate in overload resolution unless remove_cvref_t<Variantsi> is a specialization of variant for all 0 <= i < n.
[ 2021-04-19 P2162R2 was adopted at February 2021 plenary. Status changed: Tentatively Resolved → Resolved. ]
[ 2020-11-18; this will be resolved by P2162. ]
[ 2018-06-18 after reflector discussion ]
Priority set to 2; status to LEWG
[ 2018-01-24, Daniel comments ]
This issue should be reviewed in common with LWG 2970.
std::visit accepts a parameter pack of forwarding references named vars whose types are the parameter pack Variants. Despite that:
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-04-19 14:17:33 | admin | set | messages: + msg11766 |
2020-11-18 12:14:32 | admin | set | messages: + msg11617 |
2020-11-18 12:14:32 | admin | set | status: lewg -> resolved |
2018-06-19 05:49:11 | admin | set | messages: + msg9925 |
2018-06-19 05:49:11 | admin | set | status: new -> lewg |
2018-01-24 20:29:21 | admin | set | messages: + msg9630 |
2018-01-24 00:48:55 | admin | set | messages: + msg9627 |
2018-01-23 00:00:00 | admin | create |