Bug 269044 - The C++20 feature 'std::source_location' is missing
Summary: The C++20 feature 'std::source_location' is missing
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL: https://libcxx.llvm.org/ReleaseNotes....
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-19 08:31 UTC by Yuri Victorovich
Modified: 2023-01-19 18:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2023-01-19 08:31:23 UTC
CppReference says that std::source_location is partially supported by clang-15. However, there's no header 'source_location' present under /usr/include and std::source_location isn't working.

https://en.cppreference.com/w/cpp/compiler_support/20
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-19 09:13:37 UTC
This was only added very recently upstream (as of 2023-01-11), in https://github.com/llvm/llvm-project/commit/73d94b19161355d06f20678d628555719eebbdcc, so it will be in libc++ 16. It appears to depend on the __builtin_source_location() function, which might be pretty new too.

That said, I expect this won't be backported to the 15.x branch, so it will only be available for clang/libc++ 16.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2023-01-19 16:58:37 UTC
This project https://github.com/wwmm/easyeffects can't be ported because of this issue. GCC also fails to build it because of incompatibility with dependencies.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2023-01-19 18:40:31 UTC
According to the LLVM website https://llvm.org/ LLVM-16 is scheduled to be released on Mar 7th, 2023.