Skip to content

Instantly share code, notes, and snippets.

@zaltoprofen
Created June 8, 2015 16:59
Show Gist options
  • Save zaltoprofen/6e196b3787f1e8362ddb to your computer and use it in GitHub Desktop.
Save zaltoprofen/6e196b3787f1e8362ddb to your computer and use it in GitHub Desktop.
#include <iostream>
#include <utility>
template<template<typename ..._> class F, typename ...Ts>
F<Ts...> p(Ts... args){
return F<Ts...>(args...);
}
int main(int argc, char const* argv[])
{
auto &&x = p<std::pair, int, double>(10, 3.4);
std::cout << x.first << ", " << x.second << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment