[LLVMbugs] [Bug 22370] New: Conversion to T&& via user-defined conversion to const T rejected
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jan 28 04:09:26 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22370
Bug ID: 22370
Summary: Conversion to T&& via user-defined conversion to const
T rejected
Product: clang
Version: 3.5
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: squell at alumina.nl
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13748
--> http://llvm.org/bugs/attachment.cgi?id=13748&action=edit
"no
Clang (on all versions I tried) rejects this, which according to the C++11
standard is legal code: 'obj' is not reference-compatible with 'const obj', and
so according to 8.5.3 ref should bind to a temporary initialized using the
rules for copy-initialization.
This rejection can break some constructs that are accepted in C++03, but where
the C++11 library added extra overloads for T&&.
--
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/20150128/21dfcc8f/attachment.html>
More information about the llvm-bugs
mailing list