Smooth transition to D2 for Tango users?

Sergey Gromov snake.scaly at gmail.com
Mon Sep 22 19:04:01 PDT 2008


Sergey Gromov <snake.scaly at gmail.com> wrote:
> template Const(T) {
>   version (D_Version2) {
>     alias const(T) Const;
>   } else {
>     alias T Const;
>   }
> }

errata:

template Const(T) {
  version (D_Version2) {
    mixin("alias const(T) Const;");
  } else {
    alias T Const;
  }
}

this time actually tested with both 1.035 and 2.019.



More information about the Digitalmars-d mailing list