Surprise in template parameter substitution?
问题 N3690, § 14.8.2 paragraph 3 has this pretty mind blowing example: template <class Z> void h(Z, Z*); // #5: function type is h(int, const int*) h<const int>(1,0); Question: why is it not h(const int, const int*) ? From what know, Z = const int , so every occurence of Z in the template declaration can be read as const int , or am I missing something? Why pointer is different? I remember that when parameter has T& or T* it preserves cv-qualifiers of T , but I don't see any possibility to apply