forward_list.h: Only include required headers.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Sun, 7 Apr 2013 15:42:27 +0000 (15:42 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 7 Apr 2013 15:42:27 +0000 (16:42 +0100)
* include/bits/forward_list.h: Only include required headers.
(forward_list::reference): Define directly, not using __alloc_traits.
(forward_list::const_reference): Likewise.

From-SVN: r197552

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/forward_list.h

index 64e5383cf27ad26c18eac87a41eb5ea0620e4c93..fd0d09c2292623f1212821408adf549c22e34bca 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/bits/forward_list.h: Only include required headers.
+       (forward_list::reference): Define directly, not using __alloc_traits.
+       (forward_list::const_reference): Likewise.
+
 2013-04-07  François Dumont  <fdumont@gcc.gnu.org>
 
        * include/std/functional (_Derives_from_unary_function): Remove.
index 608d678d8fc8c84bf7edceb1bbf9e08b439d203b..8270c4e7f65ffc6f53416ccb8b531234a2ccf3d8 100644 (file)
 
 #pragma GCC system_header
 
-#include <memory>
-#if __cplusplus >= 201103L
 #include <initializer_list>
-#endif
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_function.h>
+#include <bits/allocator.h>
+#include <ext/alloc_traits.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
@@ -421,8 +424,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       typedef _Tp                                          value_type;
       typedef typename _Alloc_traits::pointer              pointer;
       typedef typename _Alloc_traits::const_pointer        const_pointer;
-      typedef typename _Alloc_traits::reference            reference;
-      typedef typename _Alloc_traits::const_reference      const_reference;
+      typedef value_type&                                 reference;
+      typedef const value_type&                                   const_reference;
  
       typedef _Fwd_list_iterator<_Tp>                      iterator;
       typedef _Fwd_list_const_iterator<_Tp>                const_iterator;