Skip to content

Instantly share code, notes, and snippets.

@Echooff3
Created June 6, 2018 04:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Echooff3/0a802906ad5002671b810d22eed2fb7d to your computer and use it in GitHub Desktop.
TMP Tests
// 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