Skip to content

Instantly share code, notes, and snippets.

@alekswn
Created July 14, 2017 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alekswn/fe359701bdd61dbb3f27b784bd024ef6 to your computer and use it in GitHub Desktop.
Save alekswn/fe359701bdd61dbb3f27b784bd024ef6 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
#include <array>
#include <type_traits>
using std::cout;
using std::endl;
using std::array;
void func() {
cout << endl;
};
template<typename T, typename... Targs>
void func(const T& first, const Targs&... args) {
cout << first << " ";
func(args...);
}
int main() {
func(1, "two", 3.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment