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 that is not a pointer yet implicitly
convertible to const(char)*?

A struct/class with an `alias this` to a `const(char)*`:

----
import std.traits: isPointer;

struct S
{
    const(char)* ptr;
    alias ptr this;
}

static assert(!isPointer!S && is(S : const(char)*)); /* passes */
----

Reply via email to