https://bugs.llvm.org/show_bug.cgi?id=51662
Bug ID: 51662
Summary: Conversion to ambiguous/inaccessible rvalue base is
valid in evaluated context
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Keywords: accepts-invalid
Severity: enhancement
Priority: P
Component: C++2a
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
See https://godbolt.org/z/5744Ee69o. See also
https://bugs.llvm.org/show_bug.cgi?id=37691.
```C++
template <class To, class From>
concept is_static_castable = requires(From&& (*from)()) {
static_cast<To>(from()); };
struct B { };
struct D : B { };
struct D2 : D , B { };
struct D3 : private B { };
void f()
{
D2 d2;
(void)static_cast<B&&>(d2); // no error
D3 d3;
(void)static_cast<B&&>(d3); // no error
}
```
--
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