https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87431
--- Comment #11 from Antony Polukhin <antoshkka at gmail dot com> --- Looks good. Note that boost::variant went further: if all the types are nothrow movable then variant always does the trick with moving from temporary. In that way `valueless_by_exception()` like states never happen. Such approach may not fit the libstdc++.