Files
test2/source/blender/blenlib/tests
Jacques Lucke d2485239f8 BLI: add Map.lookup_try method
This adds a new `Map.lookup_try` method that returns a `std::optional<Value>`
for a given key. If the key is not in the map, `std::nullopt` is returned. If it
is in the map, then a copy of the value is returned. Note that the copy is
necessary because `std::optional` can't contain reference types.

This method helps a lot in #132219 to reduce boilerplate.

Pull Request: https://projects.blender.org/blender/blender/pulls/132278
2024-12-23 17:03:32 +01:00
..
2024-12-23 17:03:32 +01:00