Application Context Implementation #4
| @ -4,7 +4,7 @@ pub const IntFittingRange = @import("std").math.IntFittingRange; | ||||
| /// | ||||
| 
					
					kayomn marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
| /// Returns the maximum value of `Integer`. | ||||
| /// | ||||
| pub fn maxInt(comptime Integer: type) Integer { | ||||
| pub fn maxInt(comptime Integer: type) comptime_int { | ||||
|     return switch (@typeInfo(Integer)) { | ||||
|         .Int => |info| if (info.bits == 0) 0 else | ||||
|             ((1 << (info.bits - @boolToInt(info.signedness == .signed))) - 1), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	
Warrants
TODOcomment mentioning that this stdlib dependency should be removed in future.