I have a template class which has a static pointer-to-member, like this:
template<class T, T* T::*nextptr> class Queue { T* head; T* tail; static T* T::*pnext; };
My question is how to write the initializer of the static pointer-to-member. I tried the obvious case:
template<class T, T* T::*nextptr> T* Queue<T, nextptr>::*pnext(nextptr);
But that didn’t work. Any idea?
Queue<T, nextptr>::pnextis declared as typeT* T::*, so it should look like this: