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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs