mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-30 02:47:09 +08:00
variant::do_destroy() now always resets type_id to variant_npos after destroying the active alternative. emplace()/operator= set the new discriminator only after successful construction, so if the constructor throws the variant is left valueless (index() == variant_npos) instead of reporting the stale old index. Add regression test test_emplace_throwing_is_valueless_by_exception covering both the trivially-destructible (union) and non-trivially- destructible (buffer) storage suites. Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| etl | ||