This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Overloading vs. string functions, etc.
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Overloading vs. string functions, etc.
- From: scott snyder <snyder at fnal dot gov>
- Date: 24 May 2001 15:08:37 -0500
- Cc: libstdc++ at gcc dot gnu dot org
- References: <20010524112207W.mitchell@codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> How about `#define strcpy __glibcpp_strcpy' in std_cstring.h before
> including /usr/includ/string.h? I think that would do the trick.
> Thoughts?
Will that work if someone includes <string.h> directly, before <cstring>?
#include <string.h>
#include <cstring>
...
That's not unlikely to occur in practise, especially for the case where
<cstring> isn't included directly, but is pulled in by one of the
other C++ headers.
I'm not sure how to deal with that, other than providing a string.h
in libstdc++ that does the wrapping around the /usr/include/string.h
functions.
sss