Unexpected result of IsInstanceOf

Ben Jones fake at fake.fake
Fri Jan 31 00:51:45 UTC 2020


The following result doesn't make sense to me... how does 
isInstanceOf return false?

```
import std.traits;
import std.stdio;
import std.typecons;
auto f(T)(T t){
	return Nullable!T(t); 	
}
void main(){
     auto f3 = f(3);
     writeln(typeof(f3).stringof);
     writeln(isInstanceOf!(Nullable, f3));
}
```

outputs

```
Nullable!int
false
```


More information about the Digitalmars-d-learn mailing list