https://llvm.org/bugs/show_bug.cgi?id=30266
Bug ID: 30266
Summary: [CWG 909] C-style cast necessitating static_cast ->
const_cast fails for conversion operator
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
struct S {
operator const int* ();
};
void f(S& s) {
const_cast<int*>(static_cast<const int*>(s)); // #1
(int*) s; // #2
}
#2 is intended to be valid (see core issue 909), yet fails to compile.
--
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