Bug 104477 - [C++23] Implement P2255R2, type trait to detect reference binding to temporary
Summary: [C++23] Implement P2255R2, type trait to detect reference binding to temporary
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 12.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: c++23-core
  Show dependency treegraph
 
Reported: 2022-02-09 19:46 UTC by Jason Merrill
Modified: 2022-02-10 00:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2022-02-09 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Merrill 2022-02-09 19:46:36 UTC
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2255r2.html

The library type traits std::reference_{constructs,converts}_from_temporary will need a compiler intrinsic to implement.

Apparently clang already has a __reference_binds_to_temporary with similar but not identical semantics; I think let's see if they plan to adjust that builtin or add a new one before we settle on a name.