This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Overloading vs. string functions, etc.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]