mn_iterator.hpp File Reference
#include "mn_config.hpp"
#include "mn_def.hpp"

Go to the source code of this file.

Classes

struct  mn::input_iterator_tag
 
struct  mn::output_iterator_tag
 
struct  mn::forward_iterator_tag
 
struct  mn::bidirectional_iterator_tag
 
struct  mn::random_access_iterator_tag
 
struct  mn::iterator_traits< IterT >
 
struct  mn::iterator_traits< T * >
 
class  mn::reverse_iterator< TIterator >
 
class  mn::insert_iterator< TCon >
 
class  mn::back_insert_iterator< TCon >
 
class  mn::front_insert_iterator< TCon >
 
class  mn::move_iterator< TIterator >
 

Namespaces

 mn
 
 mn::internal
 

Macros

#define for_each(type, i, ctr)   for (type i = (ctr).begin(); i != (ctr).end(); ++ i)
 Shorthand for container iteration. More...
 
#define each_for(type, i, ctr)   for (type i = (ctr).rbegin(); i != (ctr).rend(); ++ i)
 Shorthand for container reverse iteration. More...
 

Functions

template<typename TIter >
constexpr iterator_traits< TIter >::difference_type mn::internal::distance (TIter first, TIter last, mn::random_access_iterator_tag)
 
template<typename TIter >
constexpr iterator_traits< TIter >::difference_type mn::internal::distance (TIter first, TIter last, mn::input_iterator_tag)
 
template<typename TIter , typename TDistance = typename iterator_traits<TIter>::difference_type>
constexpr void mn::internal::advance (TIter &iter, TDistance d, mn::random_access_iterator_tag)
 
template<typename TIter , typename TDistance = typename iterator_traits<TIter>::difference_type>
constexpr void mn::internal::advance (TIter &iter, TDistance d, mn::bidirectional_iterator_tag)
 
template<typename TIter , typename TDistance = typename iterator_traits<TIter>::difference_type>
constexpr void mn::internal::advance (TIter &iter, TDistance d, mn::input_iterator_tag)
 
template<typename TIter >
constexpr iterator_traits< TIter >::difference_type mn::distance (TIter first, TIter last)
 
template<typename TIter , typename TDistance = typename iterator_traits<TIter>::difference_type>
constexpr void mn::advance (TIter &iter, TDistance d)
 
template<typename TForwardIter , typename TDistance = typename iterator_traits<TForwardIter>::difference_type>
TForwardIter mn::next (TForwardIter x, TDistance n=1)
 
template<typename TBidirectionalIter , typename TDistance = typename iterator_traits<TBidirectionalIter>::difference_type>
TBidirectionalIter mn::prev (TBidirectionalIter x, TDistance n=1)
 
template<typename TIterator >
constexpr reverse_iterator< TIterator > mn::make_reverse_iterator (TIterator itr)
 
template<typename TCon >
constexpr insert_iterator< TCon > mn::inserter (TCon &ctr, typename TCon::iterator itr)
 
template<class TCon >
constexpr back_insert_iterator< TCon > mn::back_inserter (TCon &ctr)
 
template<class TCon >
constexpr front_insert_iterator< TCon > mn::front_inserter (TCon &ctr)
 
template<class TCon >
constexpr TCon::iterator mn::remove_const_it (typename TCon::const_iterator itr, TCon &)
 
template<typename TIterator >
constexpr move_iterator< TIterator > mn::make_move_iterator (TIterator itr)
 

Detailed Description

This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).

Author
Copyright (c) 2021 Amber-Sophia Schroeck
License
The Mini Thread Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3, or (at your option) any later version.

The Mini Thread Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Mini Thread Library; if not, see https://www.gnu.org/licenses/.


Class Documentation

◆ mn::output_iterator_tag

struct mn::output_iterator_tag

◆ mn::iterator_traits

struct mn::iterator_traits

template<typename IterT>
struct mn::iterator_traits< IterT >

Class Members
typedef typename difference_type difference_type
typedef typename iterator_category iterator_category
typedef typename pointer pointer
typedef typename reference reference
typedef typename value_type value_type

◆ mn::iterator_traits< T * >

struct mn::iterator_traits< T * >

template<typename T>
struct mn::iterator_traits< T * >

Class Members
typedef ptrdiff_t difference_type
typedef random_access_iterator_tag iterator_category
typedef value_type * pointer
typedef value_type & reference
typedef T value_type

Macro Definition Documentation

◆ each_for

#define each_for (   type,
  i,
  ctr 
)    for (type i = (ctr).rbegin(); i != (ctr).rend(); ++ i)

Shorthand for container reverse iteration.

◆ for_each

#define for_each (   type,
  i,
  ctr 
)    for (type i = (ctr).begin(); i != (ctr).end(); ++ i)

Shorthand for container iteration.