[libcxx-commits] [libcxx] [libc++][type_traits] Implements "A type trait to detect reference binding to temporary" (PR #128649)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 6 17:16:45 PST 2025


================
@@ -524,6 +533,9 @@ namespace std
 #  if _LIBCPP_STD_VER >= 23
 #    include <__type_traits/is_implicit_lifetime.h>
 #  endif
+// C++23 but private declarations are available in previous standards.
+#  include <__type_traits/reference_constructs_from_temporary.h>
+#  include <__type_traits/reference_converts_from_temporary.h>
----------------
frederick-vs-ja wrote:

I think at this moment we should guard this with `#  if _LIBCPP_STD_VER >= 23`. Let's defer the exposure of private declarations to the PR for LWG4148.

https://github.com/llvm/llvm-project/pull/128649


More information about the libcxx-commits mailing list