Тhank you for answer!
Here's a test project:
#include <unordered_map>
#include <system_error>
#include <string_view>
#include
#include
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;
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: