[LLVMbugs] [Bug 20844] C++11 uniform-init of non-const references produces code that crashes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 4 15:14:58 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20844
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Fixed in r217197:
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:27:17:
error: no viable conversion from 'S' to 'uint64_t' (aka 'unsigned long')
X(T& v) : d{v} {} // brace-init of d causes incorect behaviour
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:39:13:
note: in instantiation of function template specialization 'X::X<S>' requested
here
const X x1{s};
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:15:5:
note: candidate function
operator D& () { return d; }
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:16:5:
note: candidate function
operator const D& () const { return d; }
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:32:8:
note: in initialization of temporary of type 'D' created to list-initialize
this
reference
D& d;
^
--
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/20140904/6ab51aec/attachment.html>
More information about the llvm-bugs
mailing list