modula2: Export all string to integral and fp number conversion functions
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / operator2.C
blob09407e1b48986313e9026c89283b67eb3c498e67
1 typedef int INT_TYPEDEF;
3 template<class T>
4 class TypedIfc
6 public:
7   virtual ~TypedIfc() { }
8   virtual operator const T&() const = 0;
9   virtual const T& operator= (const T& t) = 0;
12 template<class Tnative>
13 class NullIfc : public TypedIfc<Tnative>
15 public:
16   const Tnative& operator= (const Tnative& t) { return t; }
17   operator const Tnative&() const { return *(Tnative *)0; }
20 typedef TypedIfc<INT_TYPEDEF> INT_TYPEDEFIfc;
22 NullIfc<int> i32;