When you define __need_size_t before including it only pulls in
size_t, but the cstddef header expects ptrdiff_t there too and fails.
sample code:
--
#define __need_size_t
#include
main() {}
--
error message produced by g++:
$ g++ main.cpp
In file included from main.cpp:2:
/usr/include/c++/4.3/cstddef:55: error: ::ptrdiff_t has not been declared
--
Summary: defining __need_size_t before including causes
error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stdin at stdin dot me dot uk
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35884