https://issues.dlang.org/show_bug.cgi?id=17953
--- Comment #1 from anonymous4 <[email protected]> --- Apparently even templates don't help here much: --- import std.typecons:Nullable; Nullable!V convert(T,V)(Nullable!T v, scope V delegate(T) c) { if(v.isNull)return Nullable!V(); return Nullable!V(c(v.get())); } void f() pure { Nullable!long v; Nullable!int v1=v.convert!(long,int)((a){ return cast(int)a; }); } --- Error: pure function 'f' cannot call impure function 'convert!(long, int).convert' --
