
10 Feb
2012
10 Feb
'12
10:05 a.m.
Philipp Moeller <philipp.moeller@geometryfactory.com> writes:
template<class T, class F> inline void for_each(boost::tuples::cons<T, boost::tuples::null_type> const& tuple, F f) { f(tuple.get_head()); }
template<class T, class U, class F> inline void for_each(boost::tuples::cons<T, U> const& tuple, F f) { f(tuple.get_head()); for_each(tuple.get_tail(), f); }
Proper attribution is missing. I took the code from this message on the boost mailing list http://lists.boost.org/Archives/boost/2004/09/72919.php -- Philipp Moeller