syntax for calling to with a getter as source argument

2014-07-14 Thread Klb via Digitalmars-d-learn
hello what is the right syntax for this: import std.stdio, std.conv; void main(string args[]) { ubyte[3] src = [0, 1, 2]; string trg = ; @property ubyte[3] srcAsProp(){return src;} // Error: template std.conv.to cannot

Re: syntax for calling to with a getter as source argument

2014-07-14 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jul 14, 2014 at 09:12:30PM +, Klb via Digitalmars-d-learn wrote: hello what is the right syntax for this: import std.stdio, std.conv; void main(string args[]) { ubyte[3] src = [0, 1, 2]; string trg = ;

Re: syntax for calling to with a getter as source argument

2014-07-14 Thread Ali Çehreli via Digitalmars-d-learn
On 07/14/2014 04:04 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Mon, Jul 14, 2014 at 09:12:30PM +, Klb via Digitalmars-d-learn wrote: hello what is the right syntax for this: import std.stdio, std.conv; void main(string

Re: syntax for calling to with a getter as source argument

2014-07-14 Thread Ali Çehreli via Digitalmars-d-learn
On 07/14/2014 05:10 PM, Ali Çehreli wrote: On 07/14/2014 04:04 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Mon, Jul 14, 2014 at 09:12:30PM +, Klb via Digitalmars-d-learn wrote: hello what is the right syntax for this:

Re: syntax for calling to with a getter as source argument

2014-07-14 Thread Klb via Digitalmars-d-learn
On Tuesday, 15 July 2014 at 00:19:15 UTC, Ali Çehreli wrote: On 07/14/2014 05:10 PM, Ali Çehreli wrote: On 07/14/2014 04:04 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Mon, Jul 14, 2014 at 09:12:30PM +, Klb via Digitalmars-d-learn wrote: hello what is the right syntax for