🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Alexsander Krotoff Wed, 15 Nov 1995 16:43
header new
#2579
Author: Alexsander Krotoff
Date: Wed, 15 Nov 1995 16:43
22 lines
1208 bytes
Hello c++ gurus,

In the september working paper section 18.4 (Dynamic memory management)

i	Header <new> synopsis

	#include <cstdlib>	// for size_t
	^^^^^^^^^^^^^^^^^^^^
It looks wrong. size_t must be defined in the cstdef header, not
cstdlib.

Regards,
--
Alexander Krotoff				<krotoff@such.srcc.msu.su>
Research Computer Center			[Moscow]939-2638
Moscow State University				MGU, SRCC k316. GZ B-733r.


[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: header new
#2589
Author: Steve Clamage
Date: Wed, 15 Nov 1995 21:16
31 lines
1744 bytes
In article jeh@alpha.phys.msu.su, krotoff@boy.nmd.msu.ru (Alexsander Krotoff) writes:

>In the september working paper section 18.4 (Dynamic memory management)
>
>i	Header <new> synopsis
>
>	#include <cstdlib>	// for size_t
>	^^^^^^^^^^^^^^^^^^^^
>It looks wrong. size_t must be defined in the cstdef header, not
>cstdlib.

According to the ISO C standard, size_t is defined in several headers,
one of which is <stdlib.h>, so it is not wrong to specify <cstdlib>.
But if the only definition that is required is size_t, it would
be more appropriate to include <cstddef> instead, since it has
fewer extraneous declarations.

Apart from that, it was proposed in Tokyo that no standard header
could include another (as is already the case in C). There were a
few problems discovered with that proposal, and it is still being
worked on, but some form of it may pass. In that case, this point
I expect would become moot.

---
Steve Clamage, stephen.clamage@eng.sun.com



[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads