xxxxxxxxxx
import std.traits;
auto assumePure(T)(T t) {
enum attrs = functionAttributes!T | FunctionAttribute.pure_;
return cast(SetFunctionAttributes!(T, functionLinkage!T, attrs)) t;
}
int thing = 3;
void modify()
{
thing = 4;
}
pure unittest {
assumePure(&modify)();
}