Re: IsTuple returns true for Nullable!SomeTuple

2020-12-02 Thread Ben Jones via Digitalmars-d-learn
On Wednesday, 2 December 2020 at 12:59:52 UTC, Paul Backus wrote: No, this is not a bug, because Nullable!T currently has an implicit conversion to T via `alias this`. [1] However, this implicit conversion is deprecated, and will be removed in a future release. Once that happens, `isTuple!NT`

Re: IsTuple returns true for Nullable!SomeTuple

2020-12-02 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 2 December 2020 at 05:25:09 UTC, Ben Jones wrote: This seems like very surprising behavior to me. Is it a bug? import std.typecons; alias NT = Nullable!(Tuple!(int, double)); pragma(msg, isTuple!NT); //prints true! No, this is not a bug, because Nullable!T currently has an

IsTuple returns true for Nullable!SomeTuple

2020-12-01 Thread Ben Jones via Digitalmars-d-learn
This seems like very surprising behavior to me. Is it a bug? import std.typecons; alias NT = Nullable!(Tuple!(int, double)); pragma(msg, isTuple!NT); //prints true!