aboutsummaryrefslogtreecommitdiff
path: root/lib/std/meta.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-28 16:25:40 -0400
committerGitHub <noreply@github.com>2020-04-28 16:25:40 -0400
commit5929e5ca0ebde636dd69d52d648df8cff59e6d96 (patch)
tree1ac7f32bf08840ac72bb5cf6a5eb2d694c2e192e /lib/std/meta.zig
parent03dd1fca94526f78400c662b6b1e712c05aee849 (diff)
parent0673a8d5763bf0fec007d8ed05128310a9e66719 (diff)
downloadzig-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.zig9
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,
+ },
+ });
+}