Re: struct : implicit conversion for function call arguments

2013-01-01 Thread Jonathan M Davis
On Wednesday, January 02, 2013 00:37:32 d coder wrote: > > That's not how you define implicit conversions in D. It's a weird hack > > from C++. > > Thanks for clarification. I knew about alias this, but I thought it was in > addition to constructor path. Nope. It's the _only_ way to define implic

Re: struct : implicit conversion for function call arguments

2013-01-01 Thread d coder
> That's not how you define implicit conversions in D. It's a weird hack > from C++. > > Thanks for clarification. I knew about alias this, but I thought it was in addition to constructor path. Regards - Puneet

Re: struct : implicit conversion for function call arguments

2013-01-01 Thread Peter Alexander
On Tuesday, 1 January 2013 at 17:27:10 UTC, d coder wrote: I observed that struct type function call arguments do not implicitly convert even when I define a valid constructor for type conversion. That's not how you define implicit conversions in D. It's a weird hack from C++. In D, you use