blob: afc502d58014fd97a3f49cf61d7a419ad64d20bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
const std = @import("std");
pub usingnamespace std.meta;
pub fn ReturnOf(comptime function: anytype) type {
return ReturnOfType(@TypeOf(function));
}
pub fn ReturnOfType(comptime Type: type) type {
const typeinfo: std.builtin.TypeInfo.Fn = @typeInfo(Type);
return typeinfo.return_type orelse void;
}
|