On 03/13/2017 11:58 PM, Stefan Koch wrote:
On Monday, 13 March 2017 at 22:05:24 UTC, Jack Applegame wrote:
Is this a bug?
No it's not
struct C
{
B!C;
}
is an error.
Howto compute C ? <--\
let's check the members; |
The member needs a template. |
Howto compute the template
On 03/14/2017 12:02 AM, Stefan Koch wrote:
On Monday, 13 March 2017 at 22:59:36 UTC, ag0aep6g wrote:
[...]
struct A(T) {
void m() {
char[T.sizeof] data;
}
}
/* ... rest as above ... */
I don't see how the destructor makes a difference. Soo, bug?
Try to use m.
Work
On Monday, 13 March 2017 at 22:59:36 UTC, ag0aep6g wrote:
On 03/13/2017 03:26 PM, Jack Applegame wrote:
I'm pretty sure that this code should compile
(https://dpaste.dzfl.pl/cf1e1ee6ef4b):
struct A(T) {
~this() {
char[T.sizeof] data;
}
}
struct B(T) {
A!T foo;
}
struct C {
On 03/13/2017 03:26 PM, Jack Applegame wrote:
I'm pretty sure that this code should compile
(https://dpaste.dzfl.pl/cf1e1ee6ef4b):
struct A(T) {
~this() {
char[T.sizeof] data;
}
}
struct B(T) {
A!T foo;
}
struct C {
B!C bar;
}
void main() {
C c;
}
But it doesn't:
On Monday, 13 March 2017 at 22:05:24 UTC, Jack Applegame wrote:
Is this a bug?
No it's not
struct C
{
B!C;
}
is an error.
Howto compute C ? <--\
let's check the members; |
The member needs a template. |
Howto compute the template ? |
let's compute the parameters. |
What
Is this a bug?
I'm pretty sure that this code should compile
(https://dpaste.dzfl.pl/cf1e1ee6ef4b):
struct A(T) {
~this() {
char[T.sizeof] data;
}
}
struct B(T) {
A!T foo;
}
struct C {
B!C bar;
}
void main() {
C c;
}
But it doesn't:
/d300/f416.d(3): Error: struct f416.C no size