LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
llvm::detail::enumerator_result< std::size_t, Refs... > Struct Template Reference

#include "llvm/ADT/STLExtras.h"

Public Types

using range_reference_tuple = std::tuple< Refs... >
 
using value_reference_tuple = std::tuple< std::size_t, Refs... >
 

Public Member Functions

 enumerator_result (std::size_t Index, Refs &&...Rs)
 
std::size_t index () const
 Returns the 0-based index of the current position within the original input range(s).
 
decltype(auto) value () const
 Returns the value(s) for the current iterator.
 

Static Public Attributes

static constexpr std::size_t NumRefs = sizeof...(Refs)
 
static constexpr std::size_t NumValues = NumRefs + 1
 

Friends

template<std::size_t I, typename = std::enable_if_t<I == 0>>
std::size_t get (const enumerator_result &Result)
 Returns the value at index I. This case covers the index.
 
template<std::size_t I, typename = std::enable_if_t<I != 0>>
decltype(auto) get (const enumerator_result &Result)
 Returns the value at index I.
 
template<typename... Ts>
bool operator== (const enumerator_result &Result, const std::tuple< std::size_t, Ts... > &Other)
 

Detailed Description

template<typename... Refs>
struct llvm::detail::enumerator_result< std::size_t, Refs... >

Definition at line 2238 of file STLExtras.h.

Member Typedef Documentation

◆ range_reference_tuple

template<typename... Refs>
using llvm::detail::enumerator_result< std::size_t, Refs... >::range_reference_tuple = std::tuple<Refs...>

Definition at line 2245 of file STLExtras.h.

◆ value_reference_tuple

template<typename... Refs>
using llvm::detail::enumerator_result< std::size_t, Refs... >::value_reference_tuple = std::tuple<std::size_t, Refs...>

Definition at line 2248 of file STLExtras.h.

Constructor & Destructor Documentation

◆ enumerator_result()

template<typename... Refs>
llvm::detail::enumerator_result< std::size_t, Refs... >::enumerator_result ( std::size_t  Index,
Refs &&...  Rs 
)
inline

Definition at line 2250 of file STLExtras.h.

Member Function Documentation

◆ index()

template<typename... Refs>
std::size_t llvm::detail::enumerator_result< std::size_t, Refs... >::index ( ) const
inline

Returns the 0-based index of the current position within the original input range(s).

Definition at line 2255 of file STLExtras.h.

References Idx.

◆ value()

template<typename... Refs>
decltype(auto) llvm::detail::enumerator_result< std::size_t, Refs... >::value ( ) const
inline

Returns the value(s) for the current iterator.

This does not include the index.

Definition at line 2259 of file STLExtras.h.

Friends And Related Function Documentation

◆ get [1/2]

template<typename... Refs>
template<std::size_t I, typename = std::enable_if_t<I == 0>>
std::size_t get ( const enumerator_result< std::size_t, Refs... > &  Result)
friend

Returns the value at index I. This case covers the index.

Definition at line 2268 of file STLExtras.h.

◆ get [2/2]

template<typename... Refs>
template<std::size_t I, typename = std::enable_if_t<I != 0>>
decltype(auto) get ( const enumerator_result< std::size_t, Refs... > &  Result)
friend

Returns the value at index I.

This case covers references to the iteratees.

Definition at line 2275 of file STLExtras.h.

◆ operator==

template<typename... Refs>
template<typename... Ts>
bool operator== ( const enumerator_result< std::size_t, Refs... > &  Result,
const std::tuple< std::size_t, Ts... > &  Other 
)
friend

Definition at line 2283 of file STLExtras.h.

Member Data Documentation

◆ NumRefs

template<typename... Refs>
constexpr std::size_t llvm::detail::enumerator_result< std::size_t, Refs... >::NumRefs = sizeof...(Refs)
staticconstexpr

Definition at line 2239 of file STLExtras.h.

◆ NumValues

template<typename... Refs>
constexpr std::size_t llvm::detail::enumerator_result< std::size_t, Refs... >::NumValues = NumRefs + 1
staticconstexpr

Definition at line 2242 of file STLExtras.h.


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