| 493 | // Insert/Find operations for map containers |
| 494 | template<typename Map> |
| 495 | void test_map_insert_find() { |
| 496 | Map m; |
| 497 | m.insert(fl::make_pair(1, 100)); |
| 498 | m.insert(fl::make_pair(2, 200)); |
| 499 | m.insert(fl::make_pair(3, 300)); |
| 500 | |
| 501 | FL_CHECK(m.size() == 3); |
| 502 | |
| 503 | // Find existing keys |
| 504 | auto it = m.find(2); |
| 505 | FL_CHECK(it != m.end()); |
| 506 | FL_CHECK(it->second == 200); |
| 507 | |
| 508 | // Find non-existing key |
| 509 | auto it_not = m.find(99); |
| 510 | FL_CHECK(it_not == m.end()); |
| 511 | } |
| 512 | |
| 513 | // Operator[] access for map containers |
| 514 | template<typename Map> |