This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
On extension headers and ease of use
- From: Wu Yongwei <adah at netstd dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 09 May 2003 09:24:13 +0800
- Subject: On extension headers and ease of use
- Organization: Kingnet Security, Inc.
Hi gurus and folks here,
I am a user of GCC but new to this mailing list. More and more I build
programs on GCC 3 instead of the older 2.95, and I have found the
different file names and namespace for the "extensions" like slist and
so on. I searched on Google and found it done quite some time ago, but
I have no clue why it must be done. Hence this posting.
OK, I know that they do not belong to namespace std. But the current
solution seems to me worse than non-conformance. For I now must use an
unwieldy artificial construct (GCC 3/Libstdc++ is not the only
compiler/library on this planet, isn't it?) to use slist, like:
#if !defined(HAS_STLPORT) && defined(__GNUC__) && __GNUC__ == 3
#include <ext/slist>
using __gnu_cxx::slist;
#else
#include <slist>
using std::slist;
#endif
And consider the possibility if one day slist is standardized into the
std namespace (anyone knows for sure that it won't?). How would
libstdc++ be? Reverting back to the old behaviour? What a mess!
Open source software often pays a lot of attention on standards. Surely
it is not a bad thing, but I want to emphasize that ease of use
(portability, backward compatibility, etc.) is often as equally
important. I fail to see the virtue of this change because it makes
life worse for cross-platform development.
Maybe I missed something important. If so, please correct and enlighten me.
Thanks.
Wu Yongwei