[LLVMbugs] [Bug 23802] cast-expression from lvalue to rvalue reference fails while reinterpret_cast for the same conversion works

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 6 16:29:15 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23802

Davide Italiano <davide at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |davide at freebsd.org
         Resolution|---                         |INVALID

--- Comment #1 from Davide Italiano <davide at freebsd.org> ---
hmm, I don't think this is a bug. 
Quoting the standard:
"If a conversion can be interpreted in more than one of the ways listed above,
the interpretation that appears first in the list is used, even if a cast
resulting from that interpretation is ill-formed."

So, static_cast has higher priority than reinterpret_cast and given that fails
the result is considered ill-formed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150706/77e2e183/attachment.html>


More information about the llvm-bugs mailing list