URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [operator2.C] - Rev 26
Go to most recent revision | Compare with Previous | Blame | View Log
typedef int INT_TYPEDEF;
template<class T>
class TypedIfc
{
public:
virtual ~TypedIfc() { }
virtual operator const T&() const = 0;
virtual const T& operator= (const T& t) = 0;
};
template<class Tnative>
class NullIfc : public TypedIfc<Tnative>
{
public:
const Tnative& operator= (const Tnative& t) { return t; }
operator const Tnative&() const { return *(Tnative *)0; }
};
typedef TypedIfc<INT_TYPEDEF> INT_TYPEDEFIfc;
NullIfc<int> i32;
Go to most recent revision | Compare with Previous | Blame | View Log