Post

Replies

Boosts

Views

Activity

Reply to C++ STL bug
Thanks for an answer! Here's a test project: #include <unordered_map> #include <system_error> #include <string_view> #include <functional> #include <expected> int main(int argc, const char *argv[]) { std::unordered_map<int, std::pair<int, std::function<std::expected<std::string_view, std::error_code>(void)>>> var{ {24, {42, [] -> std::expected<std::string_view, std::error_code> { return "Hello, World!"; } }} }; const auto &it{var.find(24)}; if (it == var.end()) [[unlikely]] return 1; return 0; } Flags for Apple clang v21.0.0: -03, -std=c++26 If you need more details, feel free to ask me about them. I'll try to reply as soon as I can
May ’26
Reply to C++ STL bug
Thanks for your help! I successfully sent my report. Here's the number: FB22882385
Replies
Boosts
Views
Activity
May ’26
Reply to C++ STL bug
That's the thing. This code should compile, but it doesn't. It compiles with Apple clang v17, but the latest clang (v21) makes things different... Problem probably hides in latest STL library.
Replies
Boosts
Views
Activity
May ’26
Reply to C++ STL bug
Sorry for not creating the project appropriately! Here's the link: https://disk.yandex.ru/d/gDzkLLdlOrZQAg
Replies
Boosts
Views
Activity
May ’26
Reply to C++ STL bug
Thanks for an answer! Here's a test project: #include <unordered_map> #include <system_error> #include <string_view> #include <functional> #include <expected> int main(int argc, const char *argv[]) { std::unordered_map<int, std::pair<int, std::function<std::expected<std::string_view, std::error_code>(void)>>> var{ {24, {42, [] -> std::expected<std::string_view, std::error_code> { return "Hello, World!"; } }} }; const auto &it{var.find(24)}; if (it == var.end()) [[unlikely]] return 1; return 0; } Flags for Apple clang v21.0.0: -03, -std=c++26 If you need more details, feel free to ask me about them. I'll try to reply as soon as I can
Replies
Boosts
Views
Activity
May ’26