[quote name='kindjie' timestamp='1322863474' post='4889929']
This smells like a design problem, so I'm not recommending you actually do this, but you could just make mData a void*.
Right now, it looks like you're just writing a clumsy wrapper for the C++ type system.
The class above is just an example, it's actually an Event system, where the client sends an event to a register listener. I was looking at adding a data component to the event.
I currently am using a void*, but I thought a template solution would've been more elegant solution, so I was trying to add it in with out redefining the class.
[/quote]
At no point during the invocation of an event system should you NOT know the exact type of the parameters.
A button click event handler will take exactly one type. The instant you introduce the magical void* into things you lose all type safety and introduce significant chance of bugs.
You invoke your event with a PointF, I catch the event and cast the void* I got to a PointI, and blamo bugo. Now I've got to waste MY time debugging and trying to figure out why my PointI has such wonky values, walking the stack trace, only to find out you're using a PointF... "Gee," I say, "it sure would have been nice if this event had just had the signature for a PointF instead of a void*."
Use boost signals/slots, or any of the other existing and very useful signals and slots implementations. That way you can have end to end type safety.