|
Boost : |
From: Ivan Matek (libbooze_at_[hidden])
Date: 2024-12-16 12:02:26
On Mon, Dec 16, 2024 at 12:48â¯PM ÐмиÑÑий ÐÑÑ
ипов via Boost <
boost_at_[hidden]> wrote:
> пн, 16 дек. 2024â¯Ð³. в 13:36, Ivan Matek via Boost <boost_at_[hidden]>:
>
> 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__value/try_at/overload1.html
> ).
>
Nice. IIRC I have used it. :)
btw not sure why pos means in documentation, maybe c/p mistake from other
overloads and should say key?
But unlike Json map lookup can fail for only 1 reason(element not in map),
so I feel optional would be fine, for JSON logic is different.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk