If a union contains a non-static data member with a non-trivial default constructor, the default constructor of the union is deleted by default unless a variant member of the union has a default member initializer.
That makes sense. Because in the code above what should happen to the std::string part of the union (should it be constructed by default? If not, then when should it be constructed?)
Pavel
Anonymous
olli
Shahram
Nils
Alex
Loyalty Haitaki
ɴꙩᴍᴀᴅ
!/usr
Vusal
Ryder
Diego
Dima
@𝑺𝒐𝒃𝒌𝒂
🇨🇩