Try variadic templates with recursion.
For example see http://dpaste.dzfl.pl/f49a97e35974

Reply via email to