-1

I found this snippet online

union U { int a; int b; };
template<int U::*> void f();
         ^^^^^^^^

I had never seen int U::* as a template parameter, what does it mean?

Dean
  • 5,852
  • 3
  • 32
  • 78

1 Answers1

1

It's a pointer to U's data member of int type.

navyblue
  • 746
  • 4
  • 8