OSDN Git Service

2010-08-26 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / stl_iterator_base_types.h
index 6dc0d78..70ad870 100644 (file)
@@ -1,6 +1,6 @@
 // Types used in iterator implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 #pragma GCC system_header
 
 #include <bits/c++config.h>
-#include <cstddef>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
   /**
    *  @defgroup iterators Iterators
+   *  Abstractions for uniform iterating through various underlying types.
+  */
+  //@{ 
+
+  /**
+   *  @defgroup iterator_tags Iterator Tags
    *  These are empty types, used to distinguish different iterators.  The
    *  distinction is not made by what they contain, but simply by what they
    *  are.  Different underlying algorithms can then be used based on the
@@ -77,17 +82,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   //@{ 
   ///  Marking input iterators.
   struct input_iterator_tag { };
+
   ///  Marking output iterators.
   struct output_iterator_tag { };
+
   /// Forward iterators support a superset of input iterator operations.
   struct forward_iterator_tag : public input_iterator_tag { };
+
   /// Bidirectional iterators support a superset of forward iterator
   /// operations.
   struct bidirectional_iterator_tag : public forward_iterator_tag { };
-  /// Random-access iterators support a superset of bidirectional iterator
-  /// operations.
-  struct random_access_iterator_tag : public bidirectional_iterator_tag { };
 
+  /// Random-access iterators support a superset of bidirectional
+  /// iterator operations.
+  struct random_access_iterator_tag : public bidirectional_iterator_tag { };
+  //@}
 
   /**
    *  @brief  Common %iterator class.
@@ -116,8 +125,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /**
+   *  @brief  Traits class for iterators.
+   *
    *  This class does nothing but define nested typedefs.  The general
-   *  version simply "forwards" the nested typedefs from the Iterator
+   *  version simply @a forwards the nested typedefs from the Iterator
    *  argument.  Specialized versions for pointers and pointers-to-const
    *  provide tighter, more correct semantics.
   */
@@ -131,6 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       typedef typename _Iterator::reference         reference;
     };
 
+  /// Partial specialization for pointer types.
   template<typename _Tp>
     struct iterator_traits<_Tp*>
     {
@@ -141,6 +153,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       typedef _Tp&                        reference;
     };
 
+  /// Partial specialization for const pointer types.
   template<typename _Tp>
     struct iterator_traits<const _Tp*>
     {