Skip to content

Instantly share code, notes, and snippets.

@alexnask
Last active May 7, 2020 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexnask/d72b5f855a9d0cdf2de19234239c9733 to your computer and use it in GitHub Desktop.
Save alexnask/d72b5f855a9d0cdf2de19234239c9733 to your computer and use it in GitHub Desktop.
pub fn ChildRecursive(comptime T: type) type {
var V = T;
while (std.meta.trait.is(.Array)(V) or std.meta.trait.is(.Pointer)(V)) : (V = std.meta.Child(V)) {}
return V;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment