This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/30571] New: Use of C++0x keywords in libstdc++-v3 headers
- From: "doug dot gregor at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2007 04:11:18 -0000
- Subject: [Bug libstdc++/30571] New: Use of C++0x keywords in libstdc++-v3 headers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The headers in ext/pb_ds use the identifier `static_assert' as the name of a
class (which emulates static assertions). The class itself is declared in
libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp
and is used from a handful of other headers. This means that these facilities
cannot be used with -std=c++0x and will warn if the -Wc++0x-compat flag goes in
(see http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01971.html).
I have two suggestions:
1) Rename class `static_assert' to something that isn't a C++0x keyword.
2) When __GXX_EXPERIMENTAL_CXX0X__ is defined, change the macro
PB_DS_STATIC_ASSERT to use the real static_assert instead of this workaround.
The macro is defined in several places, all of which will have to change anyway
(when the static_assert class is renamed).
I know this affects 4.3; I'm not sure if it affects (or matters for) 4.2 or
earlier, but I suggest at least doing #1 everywhere that ext/pb_ds is
available.
--
Summary: Use of C++0x keywords in libstdc++-v3 headers
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: doug dot gregor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30571