Topic: C++ Standard Libraries?
Author: rridge@calum.csclub.uwaterloo.ca (Ross Ridge)
Date: 1995/08/30 Raw View
Steve Clamage <clamage@Eng.Sun.COM> wrote:
>You can add your own "using namespace std;" if you want, which will bring
>the entire contents of the "std" namespace into scope (but just for those
>headers which you include).
Is that true? I thought, according to the last public draft, if you
include any standard header you could also be getting any or all other
standard headers.
[I think Ross Ridge is right. -fjh (moderator).]
While I'm on the topic of standard libraries, can anybody tell me where
the localization library comes from? Of all the standard library clauses
in the last public draft, which are in general poorly specified and
have very little priort art backing them up, this localization library
clause is the worst. Much of it so poorly specified (eg. the format
of a number or monetary value) that it cannot function usefully as
a standard. Worse, it's even unimplimentable on some architectures
(where sizeof(char) == sizeof(size_t)). It doesn't seem to pay much
attention to the prior art of POSIX and XPG4, and is overly complex
for any general use. Why did the committee feel that the C++ standard
needed a standard localization library and why did it think the one it
included in the draft standard did the job?
I maintain code the makes heavy use of locale information, everything
from date formats to message catalogs to multibyte shift encoded character
sets with variant characters(*). I don't see what the proposed standard
library would buy me except headaches trying to resolve every vendor's
incompatible (and undoubtly broken) implementation.
Ross Ridge
(*) I was about to say that it doesn't get any worse than this, but then
I remembered Unicode...
--
l/ // Ross Ridge -- The Great HTMU +1 519 883 4329
[oo][oo] rridge@csclub.uwaterloo.ca http://csclub.uwaterloo.ca/u/rridge/
-()-/()/
db //
---
[ 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. ]
Author: "muzo " <MuzoK@msn.com>
Date: 1995/08/31 Raw View
>While I'm on the topic of standard libraries, can anybody tell me where
>the localization library comes from? Of all the standard library clauses
>in the last public draft, which are in general poorly specified and
>have very little priort art backing them up, this localization library
>clause is the worst. Much of it so poorly specified (eg. the format
>of a number or monetary value) that it cannot function usefully as
>a standard. Worse, it's even unimplimentable on some architectures
>(where sizeof(char) == sizeof(size_t)). It doesn't seem to pay much
>attention to the prior art of POSIX and XPG4, and is overly complex
>for any general use. Why did the committee feel that the C++ standard
>needed a standard localization library and why did it think the one it
>included in the draft standard did the job?
my understanding is that the localization library comes from the Rogue
Wave. In a seminar I attended their CEO, Thomas Keffer was mentioning
the fact that the localization library in the Draft was very similar to
what they had upon when asked about C++ standard and tools.h++
muzo
standard disclaimer
---
[ 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. ]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/08/31 Raw View
In article qhc@calum.csclub.uwaterloo.ca, rridge@calum.csclub.uwaterloo.ca (Ross Ridge) writes:
>Steve Clamage <clamage@Eng.Sun.COM> wrote:
>>You can add your own "using namespace std;" if you want, which will bring
>>the entire contents of the "std" namespace into scope (but just for those
>>headers which you include).
>
>Is that true? I thought, according to the last public draft, if you
>include any standard header you could also be getting any or all other
>standard headers.
>
> [I think Ross Ridge is right. -fjh (moderator).]
Sorry. I didn't express that very clearly. If you include a standard
header, it in turn might indeed include other standard headers. But
using namespace std;
will affect only the declarations in the headers that actually do get
included. The using-directive by itself does not pull the entire set of
library declarations into your program. Perhaps that is too obvious, and
I needn't have mentioned it.
---
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. ]
Author: jshong@encore.kaist.ac.kr (Joon-Sung Hong)
Date: 1995/08/21 Raw View
Distribution:
Hi,
Is there a standard class library in C++?
Otherwise, is there an activity for standards?
Thanks in advance.
Joon-Sung Hong
jshong@coregate.kaist.ac.kr
---
[ 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. ]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/08/22 Raw View
In article 95Aug21114949@physics2.Berkeley.EDU, jshong@encore.kaist.ac.kr (Joon-Sung Hong) writes:
>
>Is there a standard class library in C++?
>
>Otherwise, is there an activity for standards?
C++ is entering the final rounds of standardization as a joint ANSI
and ISO standard.
You can get a copy of the current version of the draft standard, which
includes the definition of the standard library, at any of these ftp sites:
research.att.com:/dist/c++std/WP
ftp.maths.warwick.ac.uk:/pub/c++/std/WP
ftp.su.edu.au:/pub/C++/CommitteeDraft
---
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. ]
Author: ray@cse.ucsc.edu (Ray Swartz)
Date: 1995/08/22 Raw View
I read in the DWP that the header files for the different libraries
and classes no longer have a .h on the end.
However, if string.h is used, then it simply pulls in the
appropriate parts of the <string> header file.
My question:
Is there a difference between
#include <string.h>
and
#include <string>?
Ray Swartz
---
[ 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. ]
Author: Wil Evers on Thu, Aug 24, 1995 9:26 AM
Date: 1995/08/24 Raw View
This message was sent using a custom form that is not installed on your server.
Some information from the original message may not be displayed. To view the
complete message, ask your network manager to install the form on your server.
In article <41d26q$4vv@engnews2.Eng.Sun.COM>, stephen.clamage@eng.sun.com (Steve
Clamage) wrote:
> Thus, in portable code, you will be able to write for example
> #include <iostream>
> and you get the iostream declarations as required by the standard,
> no matter what the implementation provides as files or how it
> spells the file names.
>
> In addition, an implementation may allow other header spellings to
> mean the same thing. If an implementation previously used
> <iostream.hpp>, it could continue to allow that as a synonym for
> <iostream>. Existing code continues to work unchanged, and standard-
> conforming code also works correctly. I would expect all
> implementations to continue to support their original header spellings
> where they do not conflict with other requirements.
Here's a stupid newbie question about using the standard library C++ headers:
Does this mean I would still have to write `using namespace std' after the
`#include <iostream>', or is such a statement in the header itself? If so, how
can I include this header without importing its symbols directly into the
program?
- Wil Evers (wil@ittpub.nl)
[ 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. ]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/08/24 Raw View
Distribution:
In article 72a@engnews2.Eng.Sun.COM, Wil Evers on Thu, Aug 24, 1995 9:26 AM writes:
>In article <41d26q$4vv@engnews2.Eng.Sun.COM>, stephen.clamage@eng.sun.com (Steve
>Clamage) wrote:
>
>> Thus, in portable code, you will be able to write for example
>> #include <iostream>
>> and you get the iostream declarations as required by the standard,
>> no matter what the implementation provides as files or how it
>> spells the file names.
>>
>
>Here's a stupid newbie question about using the standard library C++ headers:
>Does this mean I would still have to write `using namespace std' after the
>`#include <iostream>', or is such a statement in the header itself? If so, how
>can I include this header without importing its symbols directly into the
>program?
Not a stupid question at all, but one the committee has been wrestling with.
If you use something like "#include <iostream>" (no suffix on the header
name), you will get the iostream declarations in namespace "std".
You can add your own "using namespace std;" if you want, which will bring
the entire contents of the "std" namespace into scope (but just for those
headers which you include).
Implementations will be likely also to provide compatibility headers (perhaps
e.g. <iostream.h>) which will include <iostream> followed by using-declarations
for each item in the header. That will allow existing code to compile if they
include the compatibility header. One early draft of the standard called out
headers like those explicitly, but they have since been removed from the draft.
(There still exist two versions of the C library headers, as I discussed
in the original article.)
---
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. ]