Re: [AD] [OT] new operator |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Eric Botcazou wrote:
> I've attached gcc/libstdc++-v3/libsupc++/new_op.cc from the GCC 3.3 tree.
Interesting. If they define it as
void * operator new (size_t sz)
then how come constructions like
float *f = new float[10];
work? I would think it would cause a compiler error saying that a cast
is required from void * to float *. Am I missing something here?
Hein Zelle
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
Unix is user friendly. It's just very particular about who
it's friends are.
Hein Zelle hein@xxxxxxxxxx
http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<