Then, there can be an overloaded opCast() to bool for use with if():
Int!(20, 130) i; if(auto j = i.checkBounds(20, 32)) { static assert(is(typeof(j) == Int!(20, 32))); }
Then, there can be an overloaded opCast() to bool for use with if():
Int!(20, 130) i; if(auto j = i.checkBounds(20, 32)) { static assert(is(typeof(j) == Int!(20, 32))); }