Overloading vs. string functions, etc.
Gabriel Dos Reis
gdr@codesourcery.com
Fri May 25 00:34:00 GMT 2001
Andreas Jaeger <aj@suse.de> writes:
| > Make <string.h> contain:
| >
| > #ifdef __cplusplus
| > namespace std {
| > #endif
|
| But this would break with GCC 2.95, wouldn't it? So it should be
| (__GNUC_PREREQ just check that we use GCC with the supplied version):
|
| #if defined __cplusplus && __GNUC_PREREQ (3,0)
| namespace std {
| #endif
|
| ...
|
| #if defined __cplusplus && __GNUC_PREREQ (3,0)
| }
| #endif
That is definitely OK since in gcc-2.95.x we didn't even attempt to
address the issue of conformant library.
| > Also, add overloads for the variants of these functions that are not
| > present in C? And make the functions inlines that call
| > `__builtin_foo' under C++?
|
| I'm not sure what you really mean here.
C++ changes the signature of some C functions (especially those
operating on strings) and adds overloads. I'll send a complete list
shortly.
| > Does this make sense?
|
| Not really, I'm not familiar enough with C++ library design.
That is not big deal. Some of the comments in docs/html/17_intro
might be worth reading, but feel free to ask any question.
Thanks for your patience and help.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Libstdc++
mailing list