Created
June 6, 2018 04:09
Star
You must be signed in to star a gist
TMP Tests
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
// 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