https://bugs.llvm.org/show_bug.cgi?id=48545
Bug ID: 48545
Summary: Access failure to own private inherited constructor
for prvalue direct-initialization
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: unassignedclangb...@nondot.org
Reporter: e...@catmur.co.uk
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
struct B {
void f();
private:
B(int, int = 0);
};
struct D : B { using B::B; };
void B::f() {
auto a = D{0};
auto b = D(0);
auto c = D(0, 0);
D x{0};
D y(0);
D z(0, 0);
}
Accepts: b, x, y, z. Rejects: a, c.
MSVC accepts all in C++17 mode, rejects all in C++14 mode, which apparently [1]
is due to their interpretation of the C++14 as-published wording [2].
GCC accepts all since 7.1, previously rejects all.
1. https://stackoverflow.com/a/65327682/567292
2. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs