------- Comment #2 from james dot kanze at gmail dot com  2007-04-01 15:42 
-------
Subject: Re:  template user defined conversion operator instantiated for
conversion to self

On 1 Apr 2007 14:38:52 -0000, fang at csl dot cornell dot edu
<[EMAIL PROTECTED]> wrote:

> ------- Comment #1 from fang at csl dot cornell dot edu  2007-04-01 15:38 
> -------
> Aside, it looks to me as if operator () returns a reference (const) to a
> temporary, which is undefined, no?

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.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31419

Reply via email to