1const std = @import("std");
2const extras = @import("./lib.zig");
3
4pub fn Pointee(T: type) type {
5 return switch (@typeInfo(T)) {
6 .pointer => |p| p.child,
7 else => T,
8 };
9}
10
11test {
12 try std.testing.expect(Pointee(u8) == u8);
13}
14test {
15 try std.testing.expect(Pointee(*u8) == u8);
16}