|
From: Noorez K. <noo...@gm...> - 2009-07-21 02:42:33
|
I'm having a bit of trouble understanding template partial
specialization. Here is an example that I was given with type traits:
template <typename T>
class TypeTraits {
private:
template <typename U>
struct PToMTraits
{
enum {result = false};
};
template <typename U,typename V>
struct PToMTraits<U V::*>
{
enum {result = true};
};
What does this mean? When I removed the specialization <U V::*> from the
second PToMTraits, I received an error that I had redefined the
PToMTraits struct with two arguments. When else can you redefine a
template struct with two arguments?
|