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] |
Other format: | [Raw text] |
On Tue, Feb 28, 2006 at 01:53:26AM +0100, Mateusz Åoskot wrote:
So, what is a recommended way of handling this issue today? I mean, is it bettern to not to use C version of strchr in C++ programs even if g++ allows to use it?
It's not as bad as it appears to you.
Just include <cstring> and call strchr as if the correct prototypes were provided. For valid code, the right thing will happen. The only issue is that the compiler will not detect cases where you use strchr to silently get a char* from a const char*. So all you really lose is an error check.
Best regards -- Mateusz Åoskot http://mateusz.loskot.net
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |