yaml-cpp
yaml-cpp copied to clipboard
Checking for key without mutation
Hi. I found it lacking that there is no interface to check for the existence of a key on a YAML Node. The only way to do it at the moment is to call operator with the key, and check if the result is valid. Although this works, it looks like it requires a mutation ( so its not really const ) and therefore cant be done safely across threads. Would it be possible to add a purely read-only hasKey-like method?
Are there any guidelines on the yaml-cpp thread safety? Recently I encountered some crashes and finally had to mark some yaml related copy/access with #pragma omp critical to avoid the crash.