LLVM  15.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 = typename 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 1318 of file STLExtras.h.

Member Typedef Documentation

◆ type

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

Definition at line 1322 of file STLExtras.h.


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