Re: #include <cstddef> may declare size_t only in namespace std



The message I posted in July was wrong. gcc 4.7, like previous versions of gcc, declare much more in the global namespace than required by the C++ standard. See https://bugzilla.gnome.org/show_bug.cgi?id=681071#c3.

Even though it's not required by gcc 4.7, I have change size_t and ptrdiff_t to std::size_t and std::ptrdiff_t in gtkmm, glibmm and libsigc++.

Kjell

2012-07-31 10:06, Kjell Ahlstedt skrev:
The following posts in libsigc-list discuss an issue that will affect not only libsigc++.

https://mail.gnome.org/archives/libsigc-list/2012-July/msg00007.html
https://mail.gnome.org/archives/libsigc-list/2012-July/msg00011.html

libsigc++, glibmm, gtkmm and perhaps other modules assume that '#include <cxxxxx>' (cxxxxx = cstddef, cstdlib, ctime, etc.) declares data types and functions in the global namespace. With gcc version 4.7 they are declared only in namespace std.

Kjell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]