C++ example, works:

template <class> struct A;
template <template <class> class X, class Y> struct A<X<Y>> {};

template <class> struct B;

int main() {
    A<B<int>> a;
}



But the following does not work:

struct Foo {};
template <class> struct B { Foo x; }

template <nontype P> struct A;
template <auto M, auto C, nontype P> struct A<M C::*P> {}

int main() {
    A<&B<int>::x> a;
}


D should be able to do both.

Reply via email to