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
13h
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
13h