Skip to content

Instantly share code, notes, and snippets.

Avatar

Hero Bird Robbepop

View GitHub Profile
@Robbepop
Robbepop / print_counted.cpp
Created Jun 10, 2015
Variadic Templates playground
View print_counted.cpp
#include <iostream>
template<typename T>
void print_counted_acc(size_t acc, T head) {
std::cout << acc << ' ' << head << '\n';
}
template<typename T, typename... Args>
void print_counted_acc(size_t acc, T head, Args... tail) {
std::cout << acc << ' ' << head << '\n';
You can’t perform that action at this time.