Talk:Union type

From Wikipedia, the free encyclopedia

More information Things you can help WikiProject Computer science with: ...
Close

union

This article seems to suggest that it is possible to have methods, static members, private and protected methods, and probably a few other things that I am forgetting, In C++ unions. As far as I know this is not the case, but I am not 100% certain of this. Can someone clarify in the article what features of structs are not possible for unions in C++.--King Mir 18:31, 29 April 2007 (UTC)

Static data members are allowed since C++11. Methods has always been allowed. 90.230.55.237 (talk) 09:50, 25 November 2019 (UTC)

Misconception

At most one member of a union can be active at any time

Scala 3 union types

India Education Program course assignment

Left/right alignment of pointers

import std; vs #include <*.h>

using in C++ examples

Related Articles

Wikiwand AI