https://bugs.llvm.org/show_bug.cgi?id=43680
Bug ID: 43680
Summary: Cannot throw move-only object on Windows
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Created attachment 22674
--> https://bugs.llvm.org/attachment.cgi?id=22674&action=edit
Minimal repro. Just `clang test.cpp` on Windows.
If you throw a move-only object on clang/Windows, the compiler will generate
copy that copies the object, even if it is move-only and the copy-constructor
has been deleted. The linker will then fail because it doesn't find a
definition. On Linux/Osx this works as expected. Interestingly, if you make the
copy-constructor private it will work on Windows although the code should be
(technically) unreachable.
Minimal repro in attachment.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs