get_ptr(mapOfMaps, key, key...)
Summary:
Since this is a not-uncommon pattern now:
```lang=cpp
if (auto found1 = get_ptr(m, k1)) {
if (auto found2 = get_ptr(*found, k2)) {
return use(*found2);
}
}
```
This diff enables:
```lang=cpp
if (auto found = get_ptr(m, k1, k2)) {
return use(*found);
}
```
Note that it works for const and non-const maps, returning a correspondingly mutable pointer.
Reviewed By: luciang, yfeldblum
Differential Revision:
D3812701
fbshipit-source-id:
77ace9f5dca6cdc4cae7e6dfb9e5fc1075b5b571