| 4 | |
| 5 | #include <unordered_map> |
| 6 | int main() |
| 7 | { |
| 8 | using namespace std::literals; |
| 9 | std::unordered_map<std::string, std::string> m; |
| 10 | |
| 11 | m.try_emplace("a", "a"s); |
| 12 | m.try_emplace("b", "abcd"); |
| 13 | m.try_emplace("c", 10, 'c'); |
| 14 | m.try_emplace("c", "Won't be inserted"); |
| 15 | |
| 16 | for (const auto &p : m) { |
| 17 | std::cout << p.first << " => " << p.second << '\n'; |
| 18 | } |
| 19 | } |
nothing calls this directly
no outgoing calls
no test coverage detected