1typedef int INT_TYPEDEF; 2 3template<class T> 4class TypedIfc 5{ 6public: 7 virtual ~TypedIfc() { } 8 virtual operator const T&() const = 0; 9 virtual const T& operator= (const T& t) = 0; 10}; 11 12template<class Tnative> 13class NullIfc : public TypedIfc<Tnative> 14{ 15public: 16 const Tnative& operator= (const Tnative& t) { return t; } 17 operator const Tnative&() const { return *(Tnative *)0; } 18}; 19 20typedef TypedIfc<INT_TYPEDEF> INT_TYPEDEFIfc; 21 22NullIfc<int> i32; 23