# Slow Chat Archives > Slow Chat: Visual C++: Yesterday, Today, and Tomorrow >  [RESOLVED] Managed unions?

## ABuenger

value struct myStruct
{
	int myInt;
};

union myUnion
{
	myStruct iShareMyMemory;
	myStruct meToo;
};


Results in the error C2848: 'myUnion::iShareMyMemory' : a managed type cannot be a member of a union.


StructLayout also doesn't seem to work.


Will this be supported with the next release?

----------


## joncaves

There are supported today - though it is ugly:

using namespace System;
using namespace System::Runtime::InteropServices;

[ StructLayout(LayoutKind::Explicit) ]
public value struct MyUnion
{
	[ FieldOffset(0) ]
	int data1;

	[ FieldOffset(0) ]
	String^ data2;

	[ FieldOffset(0) ]
	Double data3;
};

We have no current plans to 'improve' this support.

----------

