-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
  • 6,610
  • 6
  • 40
  • 90

1 Answers1

1

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

navyblue
  • 776
  • 4
  • 8