Advertisement
Guest User

Untitled

a guest
May 14th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. const std = @import("std");
  2.  
  3. const namespace = struct {
  4.     const hello = struct {};
  5.     var world: i32 = undefined;
  6. };
  7.  
  8. pub fn main() anyerror!void {
  9.  
  10.     inline for(std.meta.definitions(namespace)) |def| {
  11.         std.debug.warn("{}\n", @typeName(def.data.Var));
  12.         std.debug.warn("{}\n", def.name);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement