Last active
January 24, 2017 15:03
-
-
Save EricWF/07ec94adfeef563da74217a246df7990 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // C++03 | |
| template <bool Cond> void foo() { int cxx03_assertion[Cond ? 1 : -1]; } | |
| // C++11 | |
| template <bool Cond> int foo() { static_assert(Cond, ""); return 0; } | |
| // C++14 | |
| constexpr void foo(bool cond) { assert(cond); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment