On Saturday, 28 May 2016 at 11:57:09 UTC, Era Scarecrow wrote:
> auto doSomethingDumb(T)(ref T t) if(isSafe!(T))
Should also probably test for a function or delegate. So...?
auto doSomethingDumb(T)(ref T t)
if(isSafe!T && (isFunctionPointer!T || isDelegate!T)) {
T* pt = &t;
return pt.doSomething();
}