Topic: size_t
Author: "Chris Newton" <chrisnewton@no.junk.please.btinternet.com>
Date: Tue, 19 Dec 2000 00:47:51 GMT Raw View
Hi all,
Simple question: is size_t in the std namespace or not?
18.1 and 5.3.3 do not appear to say anything about it being so; indeed,
18.1 seems to imply that it is not so. However, std::size_t is mentioned
elsewhere in the standard, and in several of the better textbooks.
Thanks,
Chris
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]
Author: Ron Natalie <ron@sensor.com>
Date: Tue, 19 Dec 2000 10:46:55 GMT Raw View
Chris Newton wrote:
>
> Hi all,
>
> Simple question: is size_t in the std namespace or not?
>
> 18.1 and 5.3.3 do not appear to say anything about it being so; indeed,
> 18.1 seems to imply that it is not so. However, std::size_t is mentioned
> elsewhere in the standard, and in several of the better textbooks.
Back up to 17.4.1.1:
All library entities except macros, operator new and operator delete are defined within the
namespace std or namespaces nested within namespace std.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]
Author: James Kuyper <kuyper@wizard.net>
Date: Tue, 19 Dec 2000 10:47:21 GMT Raw View
Chris Newton wrote:
>
> Hi all,
>
> Simple question: is size_t in the std namespace or not?
>
> 18.1 and 5.3.3 do not appear to say anything about it being so; indeed,
> 18.1 seems to imply that it is not so. However, std::size_t is mentioned
> elsewhere in the standard, and in several of the better textbooks.
17.4.1.1p2: "All library entities except macros, operater new and
operator delete are defined within the namespace std or namespaces
nested within namespace std."
I believe that typedefs such as size_t are entities within the meaning
of this paragraph.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]
Author: Pete Becker <petebecker@acm.org>
Date: Tue, 19 Dec 2000 17:51:15 GMT Raw View
Chris Newton wrote:
>
> Hi all,
>
> Simple question: is size_t in the std namespace or not?
>
> 18.1 and 5.3.3 do not appear to say anything about it being so; indeed,
> 18.1 seems to imply that it is not so. However, std::size_t is mentioned
> elsewhere in the standard, and in several of the better textbooks.
>
See 17.4.1.2./4: "In the C++ Standard Library, however, the declarations
and definitions (except for names which are defined as macros in C) [in
the cname headers] are within namespace scope of the namespace std."
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Contributing Editor, C/C++ Users Journal (http://www.cuj.com)
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]
Author: Ross Smith <ross.s@ihug.co.nz>
Date: Wed, 20 Dec 2000 16:16:12 GMT Raw View
Pete Becker wrote:
>
> See 17.4.1.2./4: "In the C++ Standard Library, however, the declarations
> and definitions (except for names which are defined as macros in C) [in
> the cname headers] are within namespace scope of the namespace std."
For those of us who don't have a copy of the C89 standard, does anyone
have a list of exactly which names are macros?
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
"Normally he was insane, but he had lucid moments
when he was merely stupid." -- Heinrich Heine
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]
Author: Ron Natalie <ron@sensor.com>
Date: Wed, 20 Dec 2000 12:59:31 CST Raw View
Ross Smith wrote:
>
> Pete Becker wrote:
> >
> > See 17.4.1.2./4: "In the C++ Standard Library, however, the declarations
> > and definitions (except for names which are defined as macros in C) [in
> > the cname headers] are within namespace scope of the namespace std."
>
> For those of us who don't have a copy of the C89 standard, does anyone
> have a list of exactly which names are macros?
>
DId you look at Appendix C.2 of your C++ standard. Tables 95 and 96
list them. All of the C carry overs into C++ are listed (although
you'll need to go to the C standard to get the definintion of their
meanings.
A casual look at the the C89 spec looks like they got them all.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]