| ... | ... | @@ -866,6 +866,19 @@ pub fn Int(comptime signedness: std.builtin.Signedness, comptime bit_count: u16) |
| 866 | 866 | }); |
| 867 | 867 | } |
| 868 | 868 | |
| 869 | pub fn Float(comptime bit_count: u8) type { |
| 870 | return @Type(TypeInfo{ |
| 871 | .Float = .{ .bits = bit_count }, |
| 872 | }); |
| 873 | } |
| 874 | |
| 875 | test "std.meta.Float" { |
| 876 | try testing.expectEqual(f16, Float(16)); |
| 877 | try testing.expectEqual(f32, Float(32)); |
| 878 | try testing.expectEqual(f64, Float(64)); |
| 879 | try testing.expectEqual(f128, Float(128)); |
| 880 | } |
| 881 | |
| 869 | 882 | pub fn Vector(comptime len: u32, comptime child: type) type { |
| 870 | 883 | return @Type(TypeInfo{ |
| 871 | 884 | .Vector = .{ |