Some tests use strcmp() function, but do not include the string.h header directly. As a result, such tests do not compile under some conformant implementations. This patch adds the mentioned header file to such tests.
Diff Detail
Event Timeline
test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp | ||
---|---|---|
19 | <cstring> instead? |
test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp | ||
---|---|---|
19 | Why? Please, provide reasoning in the context of this very test. My reasoning, for example, is: in standard <string.h> defines strcmp(), <cstring> defines std::strcmp(), this very test uses the first variant of the function call. |
For complete consistency with this request, two more tests were patched. Calls to strcmp() replaced with std::strcmp() and <cstring> header added according to the requirement of the standard. The test std/depr/depr.c.headers/string_h.pass.cpp remains untouched since it checks the requirements to <string.h> header.
<cstring> instead?