I'm trying to implement properties with readonly, writeonly and readwrite behaviour. I thought template specialization would be the way to go here, so I tried this:
template<typename Class, typename Type, void (Class::*Set)(Type), Type (Class::*Get)(void)>
class Property;
template <typename Class, typename Type, Type (Class::*Get)(void)>
class Property<Class, Type, NULL, Get>
{
...
}
This doesn't work and gives an compiler error (VC): a partial specialization cannot have a dependent non-type template parameter.
I'm lost here, is this at all possible?
Thanks for your time, Richard.