[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: explicit constructor call on casted void * (gcc 3.3.3)
From: |
Paul Pluzhnikov |
Subject: |
Re: explicit constructor call on casted void * (gcc 3.3.3) |
Date: |
30 Nov 2004 17:10:38 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
"Timo Qvist" <timo.qvist@telia.com> writes:
> and am wondering whether someone can help me get it to work on gcc?
The proper way to do this is to define "placement new":
void *operator new(size_t, void *p) { return p; }
and call it:
T *newTptr = new(allocptr()) T; // calls T::T()
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.