So here is the solution:

#include <bits/stdc++.h>
struct A {
    void fn_a() {}
struct B {
    void fn_b() {}
struct C : A, B {
template<typename T, typename... Ts>
concept PointerInheritsFrom = std::is_pointer_v<T> && (std::is_base_of_v<Ts, std::remove_pointer_t<T>> && ...);
void call_stuff(PointerInheritsFrom<A, B> auto p) {
int main() {
    C z;
I think this is what you are looking for. 

On Fri, Nov 25, 2022, 16:29 Frederick Virchanza Gotham via Std-Proposals <> wrote:

On Friday, November 25, 2022, Jason McKesson via Std-Proposals <> wrote:
There seems to be a broad lack of understanding of what this feature
is doing, probably due to unfamiliarity with the way the wxWidgets
library uses base classes.

wxWidgets uses multiple inheritance in a lot of cases. The two classes
in question, `wxControl` and `wxTextEntry` are both base classes. A
control that wants to have text entry functionality would inherit from
both, but it is also possible to have text entry objects that are not
controls and controls that don't have text entry functionality.

The goal of the proposal is to be able to write a function that takes
a single pointer to any type which inherits from *two or more* base
classes. And then use that pointer to access any function which is
available from any of these base classes.

Thanks James, you hit the nail on the head here. What you wrote is _exactly_ what I'm thinking.

Std-Proposals mailing list