On Dec 22, 3:36 am, Chris Vine <ch...@cvine--nospam--.freeserve.co.uk>
wrote:> But does it do it if you don't hand off to global operator
new[]()/delete[]() and instead, say (for test purposes), run the
original poster's test with an allocator which returns a static array?
If it does give the same result then this seems to me to be a definite
non-compliance with the standard, and someone should report the bug.
Chris
For testing this I replaced
return ::operator new[]( s );
with
static int mem[100]; return &mem[0];
and the result is still the same:
delete[]: size_t=4
So i reported it tohttps://connect.microsoft.com/VisualStudio/feedback/details/631380/ov...
of-the-language-specification-in-visual-c
and I am looking forward to the answer of the compiler developers.
the number of bytes allocated.
[ comp.lang.c++.moderated. First time posters: Do this! ]