Why a template with Nullable does not compile?

Victor Porton porton at narod.ru
Tue Mar 12 05:16:20 UTC 2019


On Tuesday, 12 March 2019 at 05:14:21 UTC, Victor Porton wrote:
> Why does this not compile?
>
> import std.typecons;
>
> template FieldInfo(T, Nullable!T default_) {
> }
>
> /usr/lib/ldc/x86_64-linux-gnu/include/d/std/typecons.d(2570,17): Error: `alias T = T;` cannot alias itself, use a qualified name to create an overload set
> /usr/lib/ldc/x86_64-linux-gnu/include/d/std/typecons.d(3291,17): Error: `alias T = T;` cannot alias itself, use a qualified name to create an overload set

LDC - the LLVM D compiler (1.11.0):
   based on DMD v2.081.2 and LLVM 6.0.1



More information about the Digitalmars-d-learn mailing list