JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::IteratorPair< Begin, End > Class Template Reference

Wraps a pair of iterators, providing member begin() and end() functions that return those iterators. More...

#include <juce_Enumerate.h>

Collaboration diagram for juce::IteratorPair< Begin, End >:

Public Member Functions

constexpr IteratorPair (Begin bIn, End eIn)
 Constructs a pair from a begin and end iterator.
 
constexpr auto begin () const
 Returns the begin iterator.
 
constexpr auto end () const
 Returns the end iterator.
 

Private Attributes

Begin b
 
End e
 

Detailed Description

template<typename Begin, typename End>
class juce::IteratorPair< Begin, End >

Wraps a pair of iterators, providing member begin() and end() functions that return those iterators.

This is useful in situations where you have an iterator pair, but want to use that pair somewhere that requires an iterable range, such as in a ranged-for loop.

See also
makeRange() @tags{Core}

Constructor & Destructor Documentation

◆ IteratorPair()

template<typename Begin , typename End >
constexpr juce::IteratorPair< Begin, End >::IteratorPair ( Begin  bIn,
End  eIn 
)
inlineconstexpr

Constructs a pair from a begin and end iterator.

Instead of calling this directly, use makeRange().

Member Function Documentation

◆ begin()

template<typename Begin , typename End >
constexpr auto juce::IteratorPair< Begin, End >::begin ( ) const
inlineconstexpr

Returns the begin iterator.

References juce::IteratorPair< Begin, End >::b.

◆ end()

template<typename Begin , typename End >
constexpr auto juce::IteratorPair< Begin, End >::end ( ) const
inlineconstexpr

Returns the end iterator.

References juce::IteratorPair< Begin, End >::e.

Member Data Documentation

◆ b

template<typename Begin , typename End >
Begin juce::IteratorPair< Begin, End >::b
private

◆ e

template<typename Begin , typename End >
End juce::IteratorPair< Begin, End >::e
private

The documentation for this class was generated from the following file: