Topic: Pollution
Author: Clive Bluston <clive@emultek.co.il>
Date: 1996/09/26 Raw View
Does the Ansi standard say anything about name pollution.
For example, if I include standard library headers, am I supposed
to get various identifier definitions that are not mentioned anywhere
in the documentation ?
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: clamage@taumet.eng.sun.com (Steve Clamage)
Date: 1996/09/26 Raw View
In article 2DC1@emultek.co.il, Clive Bluston <clive@emultek.co.il> writes:
>Does the Ansi standard say anything about name pollution.
>For example, if I include standard library headers, am I supposed
>to get various identifier definitions that are not mentioned anywhere
>in the documentation ?
The entire standard library is in the "std" namespace, and you are
not allowed to add your own identifiers to "std", so pollution
should not normally be much of an issue. That is, you have a lot of
control over the visibility of those names.
Beyond that, the standard reserves certain sets of spellings for
the implementation to use in various defined ways, and which you
consequently should avoid in your own code.
---
Steve Clamage, stephen.clamage@eng.sun.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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]