2) use T instead of const T& when that makes more sense Thanks to Christian Mayer a.k.a Mekhzolan for the tips.