https://bugs.llvm.org/show_bug.cgi?id=42366
Richard Smith <richard-l...@metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
The stackoverflow answer quotes the relevant wording:
"""
A prvalue of type “pointer to member of D of type cv1 T” can be converted to a
prvalue of type “pointer to member of B of type cv2 T”, where B is a base class
of D, if cv2 is the same cv-qualification as, or greater cv-qualification than,
cv1. […] If class B contains the original member, or is a base or derived class
of the class containing the original member, the resulting pointer to member
points to the original member. Otherwise, the behavior is undefined.
"""
Here, D is Derived and B is Base. The original member is Data::foo. B does not
contain Data::foo, and is neither a base or derived class of the class
containing the original member (Data), so behavior is undefined, so the
evaluation is non-constant.
--
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