pointers, null and Typedef...
John Colvin
john.loughran.colvin at gmail.com
Sat Aug 24 02:19:12 PDT 2013
On Friday, 23 August 2013 at 18:58:49 UTC, Paolo Invernizzi wrote:
> On Friday, 23 August 2013 at 12:17:08 UTC, John Colvin wrote:
>> so, here's the situation:
>
> On 2.063.2 why not something like this:
>
> ---
> import std.typecons;
> alias T0 = Typedef!(void*, null, "T0");
> alias T1 = Typedef!(void*, null, "T1");
> static assert( ! is(T0 == T1));
> struct A
> {
> T0 t;
> this(T0 init)
> {
> t = init;
> }
> }
> void foo(){
> auto a = A(T0(null));
> // auto b = A(T1(null)); Error!
> }
> ---
>
> Paolo
It's const(void*) not just void*
Unfortunately that breaks it.
More information about the Digitalmars-d-learn
mailing list