llvm / llvm/llvm-project

[libc++] `std.functional.hash` should be exported from Clang modules for some standard library headers

Open
#169,634 1 comment 0 reactions 0 assignees View on GitHub
libc++
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Per [[unord.hash]/2](https://eel.is/c++draft/unord.hash#2), components in `<__functional/hash.h>` should be available in the following headers:
- ``
- `` (since C++26; changes being implemented)
- ``
- ``
- ``
- ``
- ``
- `` (not yet implemented)
- ``
- ``
- ``
- `` (not yet implemented)
- `` (buggy now; see #129723)
- ``
- ``
- ``
- `` (since C++26)

In Clang module builds, it should also be valid to obtain the components by including one of the these headers. However, it was observed in #169611 that this didn't work.

Presumably we need to either
- fix `module.modulemap.in` by exporting `std.functional.hash` wherever suitable, or
- directly include `<__functional/hash.h>` in these standard library headers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.