Replies: 1 comment 1 reply
-
I can see utility in these functions, but I'm not sure about the naming. I'm not sure it's obvious that in the below snippet that
The second is |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw the following snippet (see below) being used to avoid repeated code like
The idea is to add a getter function that returns
std::nullopt_t
in case an object key is not found. As this approach is very similar to thevalue
function which returns a default value in this case, it may be a good addition to the public API.Beta Was this translation helpful? Give feedback.
All reactions