On Tuesday, 19 April 2016 at 20:19:37 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 20:18:07 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaind
On Tuesday, 19 April 2016 at 20:18:07 UTC, ZombineDev wrote:
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is ther
On Tuesday, 19 April 2016 at 17:16:00 UTC, Tofu Ninja wrote:
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a
nested structure
On Tuesday, 19 April 2016 at 16:16:39 UTC, ZombineDev wrote:
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a
nested structure
but something to just add an additional name, maybe something
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a nested
structure
but something to just add an additional name, maybe something
like
struct a{
struct{
int x;
int y;
On Monday, 18 April 2016 at 23:00:42 UTC, captaindet wrote:
not sure what you mean by "named substructure, not a nested
structure" but this works:
struct Outer{
struct Inner{
int x;
int y;
int z;
}
Inner inner;
int
On Monday, 18 April 2016 at 15:59:11 UTC, Steven Schveighoffer
wrote:
I wonder if it makes a difference for layout. So for example:
struct T
{
struct
{
int x;
ubyte y;
}
ubyte z;
}
If there is padding inserted between y and z.
There isn't. T.init.z.offsetof - T.init.y.
On 2016-04-18 14:12, Tofu Ninja wrote:
Also is there a way to have a named substructure, not a nested structure
but something to just add an additional name, maybe something like
struct a{
struct{
int x;
int y;
int z;
} b;
}
not sure what you mean by "named
On 4/17/16 11:57 PM, Tofu Ninja wrote:
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I know of
though.
Actually curiously I found another potential use, applying
attributes/UDAs to multiple members at once.
enum testU
On Monday, 18 April 2016 at 03:57:26 UTC, Tofu Ninja wrote:
x,y,and z seem to all be immutable and all have the UDA
testUDA. But even odder, it seems that "struct" in there is
doing absolutely nothing. The same thing can be done with
Yeah, any attribute can be grouped with braces or colons in
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I
know of though.
Actually curiously I found another potential use, applying
attributes/UDAs to multiple members at once.
enum testUDA;
struct T{
@testUDA
On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I
know of though.
I understand the reason for allowing it in a union, I just don't
see the reason it was extended to all aggregates as it seems to
do nothing.
On Monday, 18 April 2016 at 02:42:15 UTC, Nicholas Wilson wrote:
IIRC D doesn't allow anonymous structures.
They are allowed only if they are inside another aggregate.
On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote:
Just out of curiosity, what is the point of the following?
struct a{
struct{
int x;
int y;
int z;
}
}
The grouping matters when it is nested inside a union. Here's a
re
far as I can tell, the anonymous structure does nothing.
How is it different from
struct a{
int x;
int y;
int z;
}
IIRC D doesn't allow anonymous structures.
It does, it compiles...
Accessing x,y,z on the first one with the anonymous struct is the
sa
On Monday, 18 April 2016 at 02:12:24 UTC, Tofu Ninja wrote:
Just out of curiosity, what is the point of the following?
struct a{
struct{
int x;
int y;
int z;
}
}
As far as I can tell, the anonymous structure does nothing. How
is
Just out of curiosity, what is the point of the following?
struct a{
struct{
int x;
int y;
int z;
}
}
As far as I can tell, the anonymous structure does nothing. How
is it different from
struct a{
int x;
int y
17 matches
Mail list logo