
пн, 16 дек. 2024 г. в 13:36, Ivan Matek via Boost
Hi everybody,
I presume somebody thought of this before but for some reason it never happened, but just in case it was never discussed I wonder if people here believe adding an nicer version of find(with different name obviously) to associative containers in boost would be beneficial?
In Boost.JSON I instead went for functions returning system::result (e.g. https://www.boost.io/doc/libs/latest/libs/json/doc/html/json/ref/boost__json...) for several reasons: 1) JSON already had a dependency on System, but did not have a dependency on Optional. 2) The function can fail for several reasons, and an error_code stored in the result can communicate those reasons, while optional cannot (e.g. see this: https://www.boost.io/doc/libs/latest/libs/json/doc/html/json/ref/boost__json...).