You're using a value-based template parameter, not a type-based parameter; therefore, it won't compile with
typename. Also,
Parameter is undefined; if you move it to the second position and specify a return type for
Method, it compiles. The problem is, you can't infer
Parameter.
Code:
template <class MyDummyClass, typename Parameter, void (MyDummyClass::*Method)(Parameter)>
class happy
{
public:
happy () {}
};
struct unhappy
{
void function(int) {}
};
static happy <unhappy, int, &unhappy::function> data;
Kevin Barry