[all-commits] [llvm/llvm-project] 437ad0: [libc++] Use `__reference_constructs_from_temporar...

A. Jiang via All-commits all-commits at lists.llvm.org
Mon Jun 2 19:35:06 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 437ad06f762ab07d89badecdd20627db200b98d3
      https://github.com/llvm/llvm-project/commit/437ad06f762ab07d89badecdd20627db200b98d3
  Author: A. Jiang <de34 at live.cn>
  Date:   2025-06-03 (Tue, 03 Jun 2025)

  Changed paths:
    M libcxx/include/__type_traits/reference_constructs_from_temporary.h
    M libcxx/include/tuple
    M libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.verify.cpp
    M libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp

  Log Message:
  -----------
  [libc++] Use `__reference_constructs_from_temporary` if eligible (#141916)

Currently, libc++'s `<tuple>` is using the deprecated
`__reference_binds_to_temporary` intrinsic. This PR starts to use
`__reference_constructs_from_temporary` if possible.

It seems that `__reference_constructs_from_temporary` should be used via
an internal type traits provided in
`<__type_traits/reference_constructs_from_temporary.h>`. But given the
old intrinsic was directly used, this PR doesn't switch to the current
convention yet.

P2255R2 is related. Although the paper indicated that constructors of
`tuple` should be deleted in such a case.

---------

Co-authored-by: Nikolas Klauser <nikolasklauser at berlin.de>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list