For this kind of code: struct cont { typedef const int& const_reference; }; template<typename C> struct iter { void f(const typename C::const_reference value) { } }; int main() { iter<cont> it; it.f(5); } we do not emit any warning for the 'const' in the signature of f. We simply ignore it. The EDG front-end does.
What does EDG say? What is the problem? This bug summary is too vague.
I don't see what should be warned about. The 'const' in the signature of 'f' has no effect here, but it also doesn't hurt -- its presence or absence simply doesn't make a difference. W.
3 years in waiting... I am closing this, we have too many real bugs open to worry about.
Sorry about the delay. The warning emitted by current ICC by default is exactly: 33801.C(10): warning #21: type qualifiers are meaningless in this declaration f(const typename C::const_reference value) ^ detected during instantiation of class "iter<C> [with C=cont]" at line 16 Likewise VC++, for example. Let's keep this open for a while.
What is the difference between this and this testcase: typedef const double* const_double; void foo(const const_double); Neither C nor C++ warn here with -Wall -Wextra. Clang neither warns in the original testcase. I don't see how the const can hurt. Anyway, adding a better description...
Ok guys, let's close this.