[Bug c++/64077] dynamic_cast incorrectly rejected for private base
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 26 20:31:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64077
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Andrew Dixie from comment #0)
> I believe this is rejects-valid:
I disagree with your interpretation. This was resolved a while ago by core
issue 665:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#665
The essential wording that reflects this can be found in [expr.dynamic.cast]
p5:
"In both the pointer and reference cases, the program is ill-formed if cv2 has
greater cv-qualification than cv1 or if B is an inaccessible or ambiguous base
class of D."
More information about the Gcc-bugs
mailing list