diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-04-28 16:25:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-28 16:25:40 -0400 |
| commit | 5929e5ca0ebde636dd69d52d648df8cff59e6d96 (patch) | |
| tree | 1ac7f32bf08840ac72bb5cf6a5eb2d694c2e192e /lib/std/meta.zig | |
| parent | 03dd1fca94526f78400c662b6b1e712c05aee849 (diff) | |
| parent | 0673a8d5763bf0fec007d8ed05128310a9e66719 (diff) | |
| download | zig-5929e5ca0ebde636dd69d52d648df8cff59e6d96.tar.gz zig-5929e5ca0ebde636dd69d52d648df8cff59e6d96.zip | |
Merge pull request #5196 from tadeokondrak/@vector-to-@type-vector
`@Vector` -> `@Type(.Vector)`
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 7343cfc51a..8ebaf14a52 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -650,3 +650,12 @@ pub fn IntType(comptime is_signed: bool, comptime bit_count: u16) type { }, }); } + +pub fn Vector(comptime len: u32, comptime child: type) type { + return @Type(TypeInfo{ + .Vector = .{ + .len = len, + .child = child, + }, + }); +} |
