Il problema è risolto per le classi standard, ma
con le le classi con template funziona, ma sono se accedo
direttamente al campo
codice:
#include <cstdlib>
#include <iostream>
using namespace std;

template<class T>
class Int{
      public:
      T i;
      Int( int* value );
      ~Int();
      bool operator==( const Int& right ); 
};

template<class T>
Int<T>::Int( int* value ){
    i = value;
}

template<class T>
Int<T>::~Int(){
    i = NULL;
}

template<class T>
bool Int<T>::operator==( const Int<T>& right ){
    return *i == *right.i;
}

int main(){
    int i1 = 15;
    int i2 = 15;
    int* p1 = &i1;
    int* p2 = &i2;
    Int<int*>* I1 = new Int<int*>( p1 );
    Int<int*>* I2 = new Int<int*>( p2 );
    
    if( *I1 == *I2 ){
     cout << "okk!!!" << endl;
    }
    system("PAUSE");
    return EXIT_SUCCESS;
}
Se provo ad utilizzare il metodo predisposto il
codice non funziona più e mi viene ritornato un errore
del tipo

' passing const<int*>' as 'this' argument of 'T Int<T>::getValue() [ with T = int* ]' discards qualifiers