Hristo Hristov 6d9dfd75e4
[libc++][type_traits] Implements "A type trait to detect reference binding to temporary" (#128649)
Implements partially: [P2255R2: A type trait to detect reference binding
to temporary](https://wg21.link/P2255R2)
Issue: https://github.com/llvm/llvm-project/issues/105180

https://eel.is/c++draft/meta.type.synop
https://eel.is/c++draft/meta.unary.prop

Implented type traits:
- [x] `reference_constructs_from_temporary`
- [x] `reference_converts_from_temporary`

Closes #129049

Minor drive-by tweak to `std::is_implicit_lifetime` tests.

---------

Co-authored-by: Hristo Hristov <zingam@outlook.com>
2025-03-08 15:20:56 +01:00
..

The "module partitions" for the std module

The files in this directory contain the exported named declarations per header. These files are used for the following purposes:

  • During testing exported named declarations are tested against the named declarations in the associated header. This excludes reserved names; they are not exported.
  • Generate the module std.

These use cases require including the required headers for these "partitions" at different locations. This means the user of these "partitions" are responsible for including the proper header and validating whether the header can be loaded in the current libc++ configuration. For example "include " fails when locales are not available. The "partitions" use the libc++ feature macros to export the declarations available in the current configuration. This configuration is available if the user includes the `__config' header.

We use .inc files that we include from the top-level module instead of using real C++ module partitions. This is a lot faster than module partitions, see this for details.