[libcxx-commits] [libcxx] [libc++] Use `__reference_constructs_from_temporary` if eligible (PR #141916)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 2 08:23:50 PDT 2025


================
@@ -33,14 +33,10 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool reference_constructs_from_tempo
 #if __has_builtin(__reference_constructs_from_temporary)
 template <class _Tp, class _Up>
 inline const bool __reference_constructs_from_temporary_v = __reference_constructs_from_temporary(_Tp, _Up);
-#elif __has_builtin(__reference_binds_to_temporary)
-// TODO: Remove this once all support compilers have __reference_constructs_from_temporary implemented.
-template <class _Tp, class _Up>
-inline const bool __reference_constructs_from_temporary_v = __reference_binds_to_temporary(_Tp, _Up);
 #else
-// TODO: Remove this once https://github.com/llvm/llvm-project/issues/111477 no longer affects supported compilers.
+// TODO(LLVM 22): Remove this as all support compilers should have __reference_constructs_from_temporary implemented.
----------------
philnik777 wrote:

```suggestion
// TODO(LLVM 22): Remove this as all supported compilers should have __reference_constructs_from_temporary implemented.
```

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


More information about the libcxx-commits mailing list