https://llvm.org/bugs/show_bug.cgi?id=28929
Bug ID: 28929
Summary: make_shared accesses protected constructors
Product: libc++
Version: 3.9
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Consider the following code:
#include <memory>
struct S {
private:
S();
public:
void f() { (void)std::make_shared<S>(); }
};
struct T {
protected:
T();
public:
void f() { (void)std::make_shared<T>(); }
};
S::f() will fail to compile because S::S() is private, but T::f() does not fail
to compile with a protected constructor. Giving the class a data member, or
marking the class as final, will cause T::f() to fail as well. Likely caused by
use of EBO.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs