Re: [PATCH] Fix std::variant regression caused by never-valueless optimization

2019-04-23 Thread Jonathan Wakely
On 23/04/19 10:56 +0100, Jonathan Wakely wrote: +} catch (__gnu_cxx::forced_error) { This triggers a warning if compiled with -Wcatch-value. Fixed by this patch, committed to trunk. commit 72ffe1dada2f747fec7b9949835c0dcbe86d892f Author: Jonathan Wakely Date: Wed Apr 24 00:15:56 2019 +

[PATCH] Fix std::variant regression caused by never-valueless optimization

2019-04-23 Thread Jonathan Wakely
A regression was introduced by the recent changes to provide the strong exception safety guarantee for "never valueless" types that have O(1), non-throwing move assignment. The problematic code is: else if constexpr (__detail::__variant::_Never_valueless_alt()) { // This construction mig