aboutsummaryrefslogtreecommitdiff
path: root/contrib/libstdc++/include/ext/iterator
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2007-05-19 01:25:07 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2007-05-19 01:25:07 +0000
commitf8a1b7d9d8e7e8113637568c296021aea90c1b72 (patch)
treeea6c2718dc1e45ed535d194df808ef31f0ebac92 /contrib/libstdc++/include/ext/iterator
parent6b834ef156bcf24dcf0e281f57ee5bde03ca07cf (diff)
Notes
Diffstat (limited to 'contrib/libstdc++/include/ext/iterator')
-rw-r--r--contrib/libstdc++/include/ext/iterator23
1 files changed, 14 insertions, 9 deletions
diff --git a/contrib/libstdc++/include/ext/iterator b/contrib/libstdc++/include/ext/iterator
index 094313c76e47..b59e5ca34490 100644
--- a/contrib/libstdc++/include/ext/iterator
+++ b/contrib/libstdc++/include/ext/iterator
@@ -1,6 +1,6 @@
// HP/SGI iterator extensions -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
@@ -55,8 +55,7 @@
/** @file ext/iterator
* This file is a GNU extension to the Standard C++ Library (possibly
- * containing extensions from the HP/SGI STL subset). You should only
- * include this header if you are using GCC 3 or later.
+ * containing extensions from the HP/SGI STL subset).
*/
#ifndef _EXT_ITERATOR
@@ -67,8 +66,8 @@
#include <bits/concept_check.h>
#include <iterator>
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
// There are two signatures for distance. In addition to the one
// taking two iterators and returning a result, there is another
// taking two iterators and a reference-to-result variable, and
@@ -81,7 +80,11 @@ namespace __gnu_cxx
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- while (__first != __last) { ++__first; ++__n; }
+ while (__first != __last)
+ {
+ ++__first;
+ ++__n;
+ }
}
template<typename _RandomAccessIterator, typename _Distance>
@@ -90,7 +93,8 @@ namespace __gnu_cxx
_Distance& __n, std::random_access_iterator_tag)
{
// concept requirements
- __glibcxx_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
__n += __last - __first;
}
@@ -107,7 +111,8 @@ namespace __gnu_cxx
// concept requirements -- taken care of in __distance
__distance(__first, __last, __n, std::__iterator_category(__first));
}
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
#endif