Created
June 6, 2018 04:09
-
-
Save Echooff3/0a802906ad5002671b810d22eed2fb7d to your computer and use it in GitHub Desktop.
TMP Tests
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
// sequence template | |
#include <iostream> | |
using namespace std; | |
/* OMG awesome void_t metafunction will change your life */ | |
template <typename...> | |
using void_t = void; | |
typedef std::integral_constant<int, 2> two_t; | |
typedef std::integral_constant<int, 4> four_t; | |
typedef std::integral_constant<int, two_t::value + four_t::value> six_t; | |
int main() { | |
cout << six_t::value << endl; | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment