Re: What other than a pointer can be converted implicitly to const(char)*?

2015-12-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/21/15 3:47 PM, anonymous wrote: On 21.12.2015 21:20, Steven Schveighoffer wrote: This seems like an incorrect feature then. Why wouldn't I want S to be treated like any other const(char)*? Seems like it's explicitly saying "treat this like a const(char)*" To my understanding, `alias

Re: What other than a pointer can be converted implicitly to const(char)*?

2015-12-21 Thread anonymous via Digitalmars-d-learn
On 21.12.2015 21:20, Steven Schveighoffer wrote: This seems like an incorrect feature then. Why wouldn't I want S to be treated like any other const(char)*? Seems like it's explicitly saying "treat this like a const(char)*" To my understanding, `alias this` means "is implicitly convertible to

Re: What other than a pointer can be converted implicitly to const(char)*?

2015-12-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/21/15 12:03 PM, anonymous wrote: On 21.12.2015 17:02, Shriramana Sharma wrote: https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L878 The `static if` condition here says if something is a pointer and if it is implicitly convertible to const(char)*. The isPointer!

What other than a pointer can be converted implicitly to const(char)*?

2015-12-21 Thread Shriramana Sharma via Digitalmars-d-learn
https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L878 The `static if` condition here says if something is a pointer and if it is implicitly convertible to const(char)*. The isPointer! part seems superfluous. Is there something that is not a pointer yet implicitly

Re: What other than a pointer can be converted implicitly to const(char)*?

2015-12-21 Thread anonymous via Digitalmars-d-learn
On 21.12.2015 17:02, Shriramana Sharma wrote: https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L878 The `static if` condition here says if something is a pointer and if it is implicitly convertible to const(char)*. The isPointer! part seems superfluous. Is there something