From patchwork Wed Jul 20 09:42:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: safe unordered local iterators From: Paolo Carlini X-Patchwork-Id: 105611 Message-Id: <4E26A2EE.4020209@oracle.com> To: Jonathan Wakely Cc: =?ISO-8859-1?Q?Fran=E7ois_Dumont?= , "libstdc++@gcc.gnu.org" , gcc-patches@gcc.gnu.org Date: Wed, 20 Jul 2011 11:42:06 +0200 On 07/20/2011 10:51 AM, Jonathan Wakely wrote: > On 20 July 2011 09:38, Jonathan Wakely wrote: >> See http://gcc.gnu.org/ml/gcc/2011-07/msg00368.html >> >> Should code inside namespace __gnu_debug be using std::size_t instead >> of assuming ::size_t has been declared? >> > Or maybe that use (which is the only unqualified size_t I see in > include/debug/* outside of namespace std) should be using size_type > anyway. Indeed. I applied the below, to resolve this pressing issue, Jonathan will hopefully provide soon feedback about the naming issue. Paolo. ///////////////////// 2011-07-20 Paolo Carlini * include/debug/safe_local_iterator.h (_Safe_local_iterator<>:: _Safe_local_iterator(const _Iterator&, size_type, const _Sequence*)): Fix typo. Index: include/debug/safe_local_iterator.h =================================================================== --- include/debug/safe_local_iterator.h (revision 176499) +++ include/debug/safe_local_iterator.h (working copy) @@ -88,7 +88,7 @@ * @pre @p seq is not NULL * @post this is not singular */ - _Safe_local_iterator(const _Iterator& __i, size_t __bucket, + _Safe_local_iterator(const _Iterator& __i, size_type __bucket, const _Sequence* __seq) : _Safe_local_iterator_base(__seq, _M_constant()), _M_current(__i), _M_bucket(__bucket)