[Bug libstdc++/30571] New: Use of C++0x keywords in libstdc++-v3 headers
doug dot gregor at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 24 04:11:00 GMT 2007
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
More information about the Gcc-bugs
mailing list