like like_t
Synopsis
Declared in <folly/Traits.h>
template<
typename Src,
typename Dst>
using like_t = /* implementation-defined */::apply</* implementation-defined */>;
Description
Similar to like and like_t from p0847r0, but with semantics made compatible with the C++23 std::forward_like from p2445r0.
Differences:
-
Never removes
constqualifiers fromDst. -
Leaves any
volatileas it was onDst,Srcvolatility is ignored. -
Unlike
__forward_like_tfrom p2445r0, distinguishes between valueSrcand rvalue‐referenceSrctypes.
The above are the right semantics for most cases.
The rare cases which need to replace all cvref qualifiers from Src onto Dst may use copy_cvref_t. But heed the cautions in its documentation.
mimic: like, p0847r0
Created with MrDocs