LLVM 19.0.0git
Public Types | List of all members
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 = std::conditional_t< std::is_reference< EltTy >::value, FirstTy, std::remove_reference_t< FirstTy > >
 

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 1414 of file STLExtras.h.

Member Typedef Documentation

◆ type

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

Definition at line 1416 of file STLExtras.h.


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