From b62c62f4b017b1b3bab47e2b928c795a15e66a0f Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 13 Nov 2013 16:47:04 +0100 Subject: [PATCH] re PR libstdc++/59087 (Issues including complex.h in C++11/1y mode because of C's complex.h) 2013-11-13 Marc Glisse PR libstdc++/59087 * include/ext/pod_char_traits.h: Uglify V, I and S. From-SVN: r204750 --- libstdc++-v3/ChangeLog | 5 ++++ libstdc++-v3/include/ext/pod_char_traits.h | 34 ++++++++++++---------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 38c70c583e8b..5abe56ec6f88 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2013-11-13 Marc Glisse + + PR libstdc++/59087 + * include/ext/pod_char_traits.h: Uglify V, I and S. + 2013-11-11 Jonathan Wakely PR libstdc++/54562 diff --git a/libstdc++-v3/include/ext/pod_char_traits.h b/libstdc++-v3/include/ext/pod_char_traits.h index dcd86ff98429..8e3ad9884d96 100644 --- a/libstdc++-v3/include/ext/pod_char_traits.h +++ b/libstdc++-v3/include/ext/pod_char_traits.h @@ -45,13 +45,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // int_type to properly hold the full range of char_type values as // well as EOF. /// @brief A POD class that serves as a character abstraction class. - template + template struct character { - typedef V value_type; - typedef I int_type; - typedef S state_type; - typedef character char_type; + typedef _Value value_type; + typedef _Int int_type; + typedef _St state_type; + typedef character<_Value, _Int, _St> char_type; value_type value; @@ -73,14 +73,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; - template + template inline bool - operator==(const character& lhs, const character& rhs) + operator==(const character<_Value, _Int, _St>& lhs, + const character<_Value, _Int, _St>& rhs) { return lhs.value == rhs.value; } - template + template inline bool - operator<(const character& lhs, const character& rhs) + operator<(const character<_Value, _Int, _St>& lhs, + const character<_Value, _Int, _St>& rhs) { return lhs.value < rhs.value; } _GLIBCXX_END_NAMESPACE_VERSION @@ -91,14 +93,14 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION /// char_traits<__gnu_cxx::character> specialization. - template - struct char_traits<__gnu_cxx::character > + template + struct char_traits<__gnu_cxx::character<_Value, _Int, _St> > { - typedef __gnu_cxx::character char_type; - typedef typename char_type::int_type int_type; - typedef typename char_type::state_type state_type; - typedef fpos pos_type; - typedef streamoff off_type; + typedef __gnu_cxx::character<_Value, _Int, _St> char_type; + typedef typename char_type::int_type int_type; + typedef typename char_type::state_type state_type; + typedef fpos pos_type; + typedef streamoff off_type; static void assign(char_type& __c1, const char_type& __c2)