This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31419] template user defined conversion operator instantiated for conversion to self
- From: "fang at csl dot cornell dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2007 15:57:27 -0000
- Subject: [Bug c++/31419] template user defined conversion operator instantiated for conversion to self
- References: <bug-31419-9635@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from fang at csl dot cornell dot edu 2007-04-01 16:57 -------
Subject: Re: template user defined conversion operator
instantiated for conversion to self
> There is no operator() in the code. And there is no undefined
> behavior is the reference is not used. But that's not the
> point. What the user defined conversion operator does is
> irrelevant, since it should never even be instantiated.
>
> (This is not the actual code in my application, of course. I've
> simplified it to the maximum.)
Yep, I realize it's irrelevant, which is why I mentioned it as an 'aside'.
:) Just brought it up in case the non-reduced version in your original
code does actually use it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31419