Patchwork fix libstdc++/55631

login
register
mail settings
Submitter Jonathan Wakely
Date Dec. 11, 2012, 10:31 p.m.
Message ID <CAH6eHdTqQtfD+xZg1Mo7Qt3oiFep62GRsM96=KkGgc9pRnuWoQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/205325/
State New
Headers show

Comments

Jonathan Wakely - Dec. 11, 2012, 10:31 p.m.
PR libstdc++/55631
        * include/ext/alloc_traits.h: Include missing header.
        * include/ext/pointer.h: Likewise.
        * include/ext/string_conversions.h: Require C++11.
        * libsupc++/initializer_list: Reindent.

Tested x86_64-linux, committed to trunk.
commit 4e4d3c624f02150044702ff9bff695c2c168308f
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
Date:   Tue Dec 11 19:29:27 2012 +0000

    	PR libstdc++/55631
    	* include/ext/alloc_traits.h: Include missing header.
    	* include/ext/pointer.h: Likewise.
    	* include/ext/string_conversions.h: Require C++11.
    	* libsupc++/initializer_list: Reindent.
Jonathan Wakely - Dec. 12, 2012, 11:05 p.m.
On 11 December 2012 22:31, Jonathan Wakely wrote:
>         PR libstdc++/55631
>         * include/ext/alloc_traits.h: Include missing header.
>         * include/ext/pointer.h: Likewise.
>         * include/ext/string_conversions.h: Require C++11.
>         * libsupc++/initializer_list: Reindent.
>
> Tested x86_64-linux, committed to trunk.

Also committed to the 4.7 branch, the <ext/pointer.h> error is a
regression from 4.6

Patch

diff --git a/libstdc++-v3/include/ext/alloc_traits.h b/libstdc++-v3/include/ext/alloc_traits.h
index a0834c3..b46b0fc 100644
--- a/libstdc++-v3/include/ext/alloc_traits.h
+++ b/libstdc++-v3/include/ext/alloc_traits.h
@@ -32,6 +32,7 @@ 
 #pragma GCC system_header
 
 #if __cplusplus >= 201103L
+# include <bits/move.h>
 # include <bits/alloc_traits.h>
 #else
 # include <bits/allocator.h>  // for __alloc_swap
diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h
index 5592a77..b3c8687 100644
--- a/libstdc++-v3/include/ext/pointer.h
+++ b/libstdc++-v3/include/ext/pointer.h
@@ -43,6 +43,7 @@ 
 #include <ext/cast.h>
 #include <ext/type_traits.h>
 #if __cplusplus >= 201103L
+# include <bits/move.h>
 # include <bits/ptr_traits.h>
 #endif
 
diff --git a/libstdc++-v3/include/ext/string_conversions.h b/libstdc++-v3/include/ext/string_conversions.h
index f85ab99..7df905f 100644
--- a/libstdc++-v3/include/ext/string_conversions.h
+++ b/libstdc++-v3/include/ext/string_conversions.h
@@ -31,6 +31,10 @@ 
 
 #pragma GCC system_header
 
+#if __cplusplus < 201103L
+# include <bits/c++0x_warning.h>
+#else
+
 #include <bits/c++config.h>
 #include <ext/numeric_traits.h>
 #include <bits/functexcept.h>
@@ -98,4 +102,6 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
 
+#endif // C++11
+
 #endif // _STRING_CONVERSIONS_H
diff --git a/libstdc++-v3/libsupc++/initializer_list b/libstdc++-v3/libsupc++/initializer_list
index 5e2a78b..89add48 100644
--- a/libstdc++-v3/libsupc++/initializer_list
+++ b/libstdc++-v3/libsupc++/initializer_list
@@ -77,7 +77,7 @@  namespace std
       // One past the last element.
       constexpr const_iterator
       end() const noexcept { return begin() + size(); }
-  };
+    };
 
   /**
    *  @brief  Return an iterator pointing to the first element of