https://bugs.llvm.org/show_bug.cgi?id=47786
Bug ID: 47786
Summary: Compiled binary does not invoke specialized
constructor
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
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 24040
--> https://bugs.llvm.org/attachment.cgi?id=24040&action=edit
Sample program demonstrating the issue
This was reported by my colleague Lucas Wang.
I have attached a sample program from him.
https://godbolt.org/z/n5qPeM also has a copy
The code and comments explain the issue more clearly but in short:
- We have a class template with a deleted copy constructor
- We specialize that class and add back the copy constructor for that class
- The main function should invoke that specialized copy constructor and indeed
compilation fails without it
- However, at runtime, the copy constructor does not get invoked
I'm not sure if this is an ill-formed program but for comparison, gcc does seem
to invoke the constructor.
--
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