Created
June 24, 2014 13:38
-
-
Save rigibun/8e5a421bd72217f5cc78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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