[LLVMbugs] [Bug 23849] New: Implement CWG 1579: Return by converting move constructor
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 15 09:06:28 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23849
Bug ID: 23849
Summary: Implement CWG 1579: Return by converting move
constructor
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: howard.hinnant at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
New rules for implicit move on return for C++14:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579
Here is a test to detect if the rules are implemented. This should not compile
in C++11 and should compile in C++14:
struct X
{
X() = default;
X(X&&) = default;
};
struct Y
{
Y() = default;
Y(Y&&) = default;
Y(X&&) {}
};
Y
test()
{
X x;
return x;
}
int
main()
{
auto y = test();
}
--
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/20150615/7860b740/attachment.html>
More information about the llvm-bugs
mailing list