I think void foo(Hello,World,World,Hello) should be mangled _Z3foo5Hello5WorldS1_S0_ since at the first substitution, the candidates are S_ = foo S0_ = Hello S1_ = World Am I missing one somewhere?