http://llvm.org/bugs/show_bug.cgi?id=15328
Richard Smith <richard-l...@metafoo.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |richard-l...@metafoo.co.uk Resolution|--- |INVALID --- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> --- Actually, it does. Per [dcl.init.ref]: "If the initializer expression is an rvalue, with T2 a class type, and “cv1 T1” is reference-compatible with “cv2 T2,” the reference is bound in one of the following ways (the choice is implementation-defined): — The reference is bound to the object represented by the rvalue (see 3.10) or to a sub-object within that object. — A temporary of type “cv1 T2” [sic] is created, and a constructor is called to copy the entire rvalue object into the temporary. The reference is bound to the temporary or to a sub-object within the temporary. The constructor that would be used to make the copy shall be callable whether or not the copy is actually done." You can lift this restriction with either -std=c++11 or -Wno-bind-to-temporary-copy. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs