On Friday, 21 October 2016 at 08:18:58 UTC, rikki cattermole
wrote:
On 21/10/2016 9:13 PM, TheFlyingFiddle wrote:
On Friday, 21 October 2016 at 07:56:27 UTC, rikki cattermole
wrote:
You're gonna have to use UDA's for that.
Yes, to do the serialization you're right.
But my usecase for this
On 21/10/2016 9:13 PM, TheFlyingFiddle wrote:
On Friday, 21 October 2016 at 07:56:27 UTC, rikki cattermole wrote:
You're gonna have to use UDA's for that.
Yes, to do the serialization you're right.
But my usecase for this is for error reporting. Basically any struct
that contains unions
I am trying to port a serialization library I wrote in Lua some
time ago. I've ran into a problem relating to types with
anonymous unions inside.
Given this code:
enum Kind
{
none = 0,
array,
integer,
floating,
}
struct Foo
{
Kind type;
union
{
ulong integer;
On 21/10/2016 8:55 PM, TheFlyingFiddle wrote:
I am trying to port a serialization library I wrote in Lua some time
ago. I've ran into a problem relating to types with anonymous unions
inside.
Given this code:
enum Kind
{
none = 0,
array,
integer,
floating,
}
struct Foo
{
Kind
On Mon, 2016-01-18 at 21:50 +0100, Jacob Carlborg via Digitalmars-d-
learn wrote:
> On 2016-01-18 19:11, Russel Winder via Digitalmars-d-learn wrote:
>
> > It seems DStep is producing somewhat strange D from complicated C
> > unions.
>
> Please report any issues to [1] with a test case. C code,
So this is an error?
union flob {
ulong data;
struct thingy {
uint data;
uint bits;
}
thingy burble;
};
because you cannot have a union field with a name that is also the name
of a struct field defined within the union.
--
On 18.01.2016 18:10, Russel Winder via Digitalmars-d-learn wrote:
So this is an error?
union flob {
ulong data;
struct thingy {
uint data;
uint bits;
}
thingy burble;
};
because you cannot have a union field with a name that is
On Mon, 2016-01-18 at 18:17 +0100, anonymous via Digitalmars-d-learn
wrote:
> On 18.01.2016 18:10, Russel Winder via Digitalmars-d-learn wrote:
> > So this is an error?
> >
> > union flob {
> > ulong data;
> > struct thingy {
> > uint data;
> > uint bits;
> > }
On 2016-01-18 19:11, Russel Winder via Digitalmars-d-learn wrote:
It seems DStep is producing somewhat strange D from complicated C
unions.
Please report any issues to [1] with a test case. C code, expected D
code, actual D code.
[1] https://github.com/jacob-carlborg/dstep/issues
--