[libcxx-commits] [libcxx] [libc++] Introduce __forward_as (PR #118168)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 12 15:37:48 PST 2024
================
@@ -39,6 +40,13 @@ forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept -> _ForwardLike<_Tp, _Up
return static_cast<_ForwardLike<_Tp, _Up>>(__ux);
}
+template <class _Tp, class _As, class _Up>
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _ForwardLike<_Tp, _As>
+__forward_as(_LIBCPP_LIFETIMEBOUND _Up&& __val) noexcept {
----------------
ldionne wrote:
Can you add a documentation comment with an example?
https://github.com/llvm/llvm-project/pull/118168
More information about the libcxx-commits
mailing list