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

Key-value pair reference for structured binding support. Enables: for (auto [key, value] : map.Items()) 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

Detailed Description

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

Key-value pair reference for structured binding support. Enables: for (auto [key, value] : map.Items())

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::KeyValueRef< 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::KeyValueRef< TheKeyType, TheValueType, IsConst >::get ( ) const
inlinenoexcept

Field Documentation

◆ Key

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

◆ Value

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

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