LLVM 22.0.0git
llvm::detail::first_or_second_type< EltTy, FirstTy > Class Template Reference

Return a reference to the first or second member of a reference. More...

#include "llvm/ADT/STLExtras.h"

Public Types

using type

Detailed Description

template<typename EltTy, typename FirstTy>
class llvm::detail::first_or_second_type< EltTy, FirstTy >

Return a reference to the first or second member of a reference.

Otherwise, return a copy of the member of a temporary.

When passing a range whose iterators return values instead of references, the reference must be dropped from decltype((elt.first)), which will always be a reference, to avoid returning a reference to a temporary.

Definition at line 1389 of file STLExtras.h.

Member Typedef Documentation

◆ type

template<typename EltTy, typename FirstTy>
using llvm::detail::first_or_second_type< EltTy, FirstTy >::type
Initial value:
std::conditional_t<std::is_reference<EltTy>::value, FirstTy,
std::remove_reference_t<FirstTy>>

Definition at line 1391 of file STLExtras.h.


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