This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15542] [3.4/3.5 Regression] operator & and template definitions
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2004 17:29:59 -0000
- Subject: [Bug c++/15542] [3.4/3.5 Regression] operator & and template definitions
- References: <20040519155139.15542.heydowns@borg.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-19 17:29 -------
Indeed, here is a smaller example:
---------
struct S {
const char** operator & ();
};
template <typename> struct S_T {
const char** operator & ();
};
template <class T> void foo(T **) {}
template <typename> void templateTest() {
S s;
foo(&s);
S_T<const char> s_t;
foo(&s_t);
}
-------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In function `void templateTest()':
x.cc:16: error: no matching function for call to `foo(S_T<const char>*&)'
The call foo(&s) goes through, but the call to foo(&s_t) doesn't. This
may indicate that gcc thinks that it is somehow dependent, even though it
is not (all template arguments are actually fixed).
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15542