MaxEW707 wrote:

> > I definitely remember this being an extension in older versions of VS 
> > around VS 2012 but don't know when MSVC no longer exactly removed support 
> > for this extension wholesale.
> 
> This was definitely required for MFC headers; I remember implementing this 
> horrible nonsense ages ago, see #14109 -- I can verify that `CComControlBase` 
> no longer has the terrible union in it, but I'm not certain when it lost it.

I went through the atlmfc headers shipped with MSVC 1914, 1929 and 1940 and 
didn't find any uses of references inside a union.

I finally managed to find this documented after some MSDN spelunking.
https://learn.microsoft.com/en-us/cpp/porting/visual-cpp-what-s-new-2003-through-2015?view=msvc-170

Look for the section titled, "Union data members".
It says, "Data members of unions can no longer have reference types. The 
following code compiled successfully in Visual Studio 2013, but produces an 
error in Visual Studio 2015.". I think it is safe to say starting with VS2015 
this is no longer supported and thus any headers shipped will not be using 
references inside unions.

https://github.com/llvm/llvm-project/pull/102851
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to