Skip to content

Instantly share code, notes, and snippets.

@nazriel
Created February 26, 2021 12:13
Show Gist options
  • Save nazriel/fcd6d1a184f3d0ea9d9a3e6effe533be to your computer and use it in GitHub Desktop.
Save nazriel/fcd6d1a184f3d0ea9d9a3e6effe533be to your computer and use it in GitHub Desktop.
import std.stdio, std.traits, std.array;
@("i")
struct Pomagamy {
char[8] M, a;
}
enum code16challange = () => Pomagamy.stringof ~ " " ~ [FieldNameTuple!Pomagamy].join("") ~ __traits(getAttributes, Pomagamy)[0];
void main() {
static foreach (i; 0..Pomagamy.sizeof) {
pragma(msg, "#" ~ fullyQualifiedName!code16challange.split(".")[1] ~ ": " ~ code16challange());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment