[Bug c++/15542] [3.4/3.5 Regression] operator & and template definitions
heydowns at borg dot com
gcc-bugzilla@gcc.gnu.org
Thu May 20 18:43:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list