The exact class is hidden if you want to access some function/member at any base class.
using VD = std::variant<double, std::string_view>;
template struct access_private::access<&VD::_M_index>;
This member pointer resolved as unsigned char std::__detail::__variant::_Variant_storage_alias<double, std::string_view>::* and not unsigned char VD::*. Currently, it cannot be queried.
It can be a nice feature that gets the exact member pointer's class:
template struct access_private::type_access_at<&VD::_M_index>;
using base_class = access_private::type_accessor_at<"_M_index">;
using result_class = access_private::type_result_at<"_M_index">;
The exact class is hidden if you want to access some function/member at any base class.
This member pointer resolved as
unsigned char std::__detail::__variant::_Variant_storage_alias<double, std::string_view>::*
and notunsigned char VD::*
. Currently, it cannot be queried.It can be a nice feature that gets the exact member pointer's class: