From 7db567cd08c715e243aa124765bc1e3374f83593 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sun, 7 Apr 2013 15:42:27 +0000 Subject: [PATCH] forward_list.h: Only include required headers. * 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 | 6 ++++++ libstdc++-v3/include/bits/forward_list.h | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 64e5383cf27..fd0d09c2292 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2013-04-07 Jonathan Wakely + + * 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 * include/std/functional (_Derives_from_unary_function): Remove. diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 608d678d8fc..8270c4e7f65 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -32,10 +32,13 @@ #pragma GCC system_header -#include -#if __cplusplus >= 201103L #include -#endif +#include +#include +#include +#include +#include +#include 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;