Templated solution to generate all permutation for a given set of objects

Uses C++11 features