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: "heydowns at borg dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2004 18:07:50 -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 heydowns at borg dot com 2004-05-19 18:07 -------
Indeed. I also noticed that I only observed this behavior with the templated
class overriding operator &.
What really baffled me (and relieved, at the same time since it allowed me to
work-around) is that doing a static_cast (in the original example) forced it to
find the template. Similarly, a case I didn't include was naming a const char
** local and assigning it the result of the & operator. This also works,
probably for the same internal reasons as static_cast does.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15542