Is it possible to have non-type template parameter which is actually a pointer to a class member? What I'm looking to do is something like the following:
struct Person {
Dog dog;
};
template <?? ptr>
struct Strange {
// ...
};
typedef Strange<&Person::dog> weird;
My work so far leads me to believe that nothing of the sort is possible, but I'm curious if anyone has can say otherwise.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…