[Bug c++/18313] Missing warning for superfluous const's in return types
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Jan 26 23:01:00 GMT 2007
------- Comment #6 from bangerth at dealii dot org 2007-01-26 23:01 -------
Hm, I'm not sure if I like this situation. Consider this snippet,
typical of template games:
---------------
template <typename T> class Array {
T& operator();
T operator() const;
};
---------------
This class will trigger a warning if instantiated as Array<const double>
because the return type of the second operator() is now 'const double'.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18313
More information about the Gcc-bugs
mailing list