Hi, this patch fixes the following compilation failure:

#include <variant>

int main()
{
   float f1 = 1.0f, f2 = 2.0f;

   std::variant<float&> v1(f1);

   v1 = f2; // #1
}

The bug is caused by a misuse of __storage. I also examined other
__storage usage, they all seem appropriate.

Tested on x86_64-linux-gnu.

Thanks!

-- 
Regards,
Tim Shen

Attachment: a.diff
Description: Binary data

Reply via email to