[Bug c++/17763] Wrong context in error message for template parameter
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Oct 1 13:13:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-10-01 13:12 -------
Confirmed. Take this smaller testcase:
----------------------
template <typename U> struct Outer {
struct Inner {};
Inner foo();
};
typedef int X;
typedef Outer<X> XOuter;
int main() {
Outer<int> ab;
ab.foo() == 1;
}
------------------------
Clearly, we make no use of the typedefs 'X' and 'XOuter', but we get this
error message:
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:11: error: no match for 'operator==' in 'ab. Outer<U>::foo [with U = X]()
== 1'
The part of the error message in brackets should really read '[with U=int]',
rather than mention 'X'. Note that if I remove the 'XOuter' typedef, then
I do indeed get what I want.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763
More information about the Gcc-bugs
mailing list