diff --git a/include/boost/iterator_adaptors.hpp b/include/boost/iterator_adaptors.hpp index 212196b..f11d672 100644 --- a/include/boost/iterator_adaptors.hpp +++ b/include/boost/iterator_adaptors.hpp @@ -1,7 +1,14 @@ -// (C) Copyright David Abrahams 2000. Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. +// (C) Copyright David Abrahams 2000. Permission to copy, use, +// modify, sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. + +// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, +// sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. #ifndef BOOST_ITERATOR_ADAPTOR_DWA053000_HPP_ # define BOOST_ITERATOR_ADAPTOR_DWA053000_HPP_ @@ -18,7 +25,8 @@ namespace boost { template struct type {}; -// Default policies for wrapped iterators. You can use this as a base +//============================================================================= +// Default policies for iterator adaptors. You can use this as a base // class if you want to customize particular policies. struct default_iterator_policies { @@ -51,7 +59,7 @@ struct default_iterator_policies { return x < y; } }; -// iterator_adaptor - A generalized adaptor around an existing iterator, which is itself an iterator +//=============================================================================// iterator_adaptor - A generalized adaptor around an existing iterator, which is itself an iterator // // Iterator - the iterator type being wrapped. // @@ -66,7 +74,7 @@ struct default_iterator_policies // std::iterator_traits for the resulting iterator. // template , #else class Traits, @@ -213,6 +221,28 @@ operator!=(const iterator_adaptor& return !Policies::equal(x.m_impl, y.m_impl); } -} +//============================================================================= +// iterator_adaptors - A type generator that simplifies creating +// mutable/const pairs of iterator adaptors. + +template , + class ConstTraits = std::iterator_traits, +#endif + class Policies = default_iterator_policies> +class iterator_adaptors +{ +public: + typedef iterator_adaptor iterator; + typedef iterator_adaptor + const_iterator; +}; + + +} // namespace boost #endif