LLVM 20.0.0git
|
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 > > |
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 1431 of file STLExtras.h.
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 1433 of file STLExtras.h.