C++ operator new

BLS windevguy at hotmail.de
Sun Jan 25 05:58:43 PST 2009


Hi,

I wonder if this is doable in D ?

class Cpp
	{
public:
	void* operator new(size_t n);
	void* operator new(size_t n, void* p)
		{ return p; }

	}

Just guessing that operator new means this in D
class D
	{
	new(uint n);
	new(uint n,void* p)
		{ return p; }

	}

Am I wrong ?
TIA, Bjoern



More information about the Digitalmars-d-learn mailing list