It's news to me that while opCast for all other types is for explicitcasting, opCast for bool works for implicit casting.as ag0... mentioned in another thread, opCast is NOT implicitly being invoked here, but rather explicitly.That is: bool x = someStruct; // error if(someStruct) // explicit opCast!bool
Documented under 'Boolean Operations' at http://dlang.org/spec/operatoroverloading.html#cast