Skip to content

Instantly share code, notes, and snippets.

@rigibun
Created June 24, 2014 13:38
Show Gist options
  • Save rigibun/8e5a421bd72217f5cc78 to your computer and use it in GitHub Desktop.
Save rigibun/8e5a421bd72217f5cc78 to your computer and use it in GitHub Desktop.
struct TRUE(T, U)
{
alias T value;
}
struct FALSE(T, U)
{
alias U value;
}
unittest
{
assert(is(TRUE!(int, double).value == int));
assert(is(FALSE!(int, double).value == double));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment