The templated provides an unary predicate for (shared) pointers that
allows containers containing pointers to objects to be searched, not by
pointer comparisons but by comparisons of the values that they point
to. This allows std::find_if to be used with shared pointers in a similar
manner that std::find is used with non-pointer objects.
The template class wraps a HashMap such that only a few operations
are allowed. Usage requires specializing a RegistryTraits class
template for each entry type.
Closer is a template using which C-style resources can be managed
in a C++ context where exceptions can occur. By placing a C resource
in a Closer instance, it is certain the resource will be freed when
the closing scope is exited irrespective of whether that occurs due
to the normal control flow, due to a return statement or an exception
having been thrown.
To be used with Closer, the CloserTraits template must be specialized
for the type in question. With this change specializations are provided
for FILE*, json_t*, pcre_code* and pcre2_match_data*.