letanphuc / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

Include cstddef instead of stddef.h #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minor nitpick, but since it's a C++ library the pugixml.hpp header should 
probably be including cstddef instead of stddef.h.  I have made the change in 
my copy and it Works for Me (TM).

In any case, thank you for a most lovely library.

Original issue reported on code.google.com by camilla.berglund on 18 Dec 2011 at 1:16

GoogleCodeExporter commented 9 years ago
This is done for portability reasons:

1. Including cstddef defines std::size_t but does not define ::size_t type in 
some Metrowerks CodeWarrior versions
2. Including cstddef defines ::size_t but does not define std::size_t type in 
Microsoft Visual Studio 6 compiler.

There is a similar discrepancy regarding some functions from standard library 
(i.e. memmove), which is why the implementation file (pugixml.cpp) includes C 
variants of stdc headers instead of C++.

Original comment by arseny.k...@gmail.com on 18 Dec 2011 at 9:14