Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst > Struct Template Reference

Key-value-index tuple reference for structured binding support. Enables: for (auto [key, value, index] : map.IndexedItems()) More...

#include <NCollection_ItemsView.hxx>

Public Types

using ValueRef = std::conditional_t<IsConst, const TheValueType&, TheValueType&>

Public Member Functions

template<std::size_t I>
decltype(auto) get () const noexcept

Data Fields

const TheKeyType & Key
ValueRef Value
int Index

Detailed Description

template<class TheKeyType, class TheValueType, bool IsConst>
struct NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >

Key-value-index tuple reference for structured binding support. Enables: for (auto [key, value, index] : map.IndexedItems())

Template Parameters
TheKeyTypethe key type
TheValueTypethe value type
IsConstif true, value is const reference; if false, mutable reference

Member Typedef Documentation

◆ ValueRef

template<class TheKeyType, class TheValueType, bool IsConst>
using NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >::ValueRef = std::conditional_t<IsConst, const TheValueType&, TheValueType&>

Member Function Documentation

◆ get()

template<class TheKeyType, class TheValueType, bool IsConst>
template<std::size_t I>
decltype(auto) NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >::get ( ) const
inlinenoexcept

Field Documentation

◆ Index

template<class TheKeyType, class TheValueType, bool IsConst>
int NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >::Index

◆ Key

template<class TheKeyType, class TheValueType, bool IsConst>
const TheKeyType& NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >::Key

◆ Value

template<class TheKeyType, class TheValueType, bool IsConst>
ValueRef NCollection_ItemsView::KeyValueIndexRef< TheKeyType, TheValueType, IsConst >::Value

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