Skip to content

Instantly share code, notes, and snippets.

View albeva's full-sized avatar

Albert Varaksin albeva

  • London, United Kingdom
View GitHub Profile
@MatthewSteel
MatthewSteel / TupleForEach.cpp
Created June 24, 2012 10:02
A "proper" for-each algorithm for tuples in C++11. Everything type-checked, no virtual function calls, heterogeneous data works.
#include <tuple>
#include <iostream>
#include <stdexcept>
using namespace std;
/*
* "A partially specialized non-type argument expression shall not involve a
* template parameter of the partial specialization except when the argument
* expression is a simple identifier."