I have some code that 100% works for the use case I have. I\'m just wondering if anyone can explain how and why it works.
I have a template class that sits between so
I think there is a better explanation why it is possible to do so than "because the standard says so":
The reason it works is because pointers-to-members are constant values known at compile time (pointer-to-member is effectively an offset of a member from the start of a class). Thus they can be used as parameters of templates, just as any other integer constant can be.
On the other hand, normal pointers are not compile time constants, because they depend on memory layout which only exists at runtime. They cannot be template arguments.