Skip to content

Add support for member pointer casting #973

Closed
@Lancern

Description

@Lancern

Given class types Base and Derived, assume Base is a public non-ambiguous non-virtual base class of Derived, there are 4 valid ways to cast relevant member pointers:

  • Casts on pointer to data members:
    • Implicit cast from T Base::* to T Derived::*
    • Explicit cast from T Derived::* to T Base::*
  • Casts on pointer to member functions:
    • Implicit cast from Ret (Base::*)(Args) to Ret (Derived::*)(Args)
    • Explicit cast from Ret (Derived::*)(Args) to Ret (Base::*)(Args)

This issue tracks the implementation status of these 4 cast types.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions