Re: struct variable initialized with void.

2015-03-31 Thread Lukasz Wrzosek via Digitalmars-d-learn
On Tuesday, 31 March 2015 at 15:12:54 UTC, ref2401 wrote: struct MyStruct { // stuff } void main(string[] args) { MyStruct s1 = void; } Could anyone describe me what this initialization does, please? When do I need to use the void initialization? By default variables are initi

Re: std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
Bug reported as https://issues.dlang.org/show_bug.cgi?id=14298

Re: std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
On Monday, 16 March 2015 at 12:03:12 UTC, John Colvin wrote: What behaviour would you expect if both IA and C inherited from IB? This case should assert at compile time. But my example shows that case with implicit case is working, but the explicit cast is not. That seems to be incorrect IMO

std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
Hello I was just exploring possibility to mimic multiple inheritance from C++ (do not ask why, just for fun). I've stumbled on below issue (let's say corner case) and most likely this is bug in implementation of template Proxy, isn't it ? import std.typecons; class IA {} class IB {} class C :