Dmitry Arkhipov
Dmitry Arkhipov
Why specifically depth-first? Why not breadth-first? What's the use case? I agree with Vinnie, this sounds like an example.
Ok, so I _am_ interested in this in a form of an example. I'm not exactly sold on this being general-purpose enough to be added to the library proper. BTW,...
There are multiple things going on here. First of all, your `any_result` has an overly tolerant constructor. As a result, `any_result x = std::vector();` compiles. In addition, C++ considers the...
Correction: the "second thing" is only applicable to version 1.84.0, in which your test would produce `42` and not `[42]`.
If making `any_result`'s constructor `explicit` is undesirable you can instead do this: ```c++ struct any_result_arg { any_result const& r; any_result_arg(any_result const& r) : r(r) {} }; void tag_invoke(boost::json::value_from_tag, boost::json::value& jv,...
Yet another version: ```c++ template< class T > typename std::enable_if< std::is_same::value >::type tag_invoke( boost::json::value_from_tag, boost::json::value& jv, const T& r) { r.value_from(jv); } ```
First of all, yes, this code is correct. Second, I honestly can't see the source of confusion: you need `value_from` when your type is not implicitly convertible to `value`. This...
As, I've mentioned previosuly, the behaviour was never intended. If it was, `json::value jv = std::vector{1,2,3}` would also have been working, but it wasn't. The behaviour was a bug. `{{"list",...
Yes, this behaviour was never intended and wasn't documented and so we removed the code that accidentally allowed it to work.
It is. I think, @kiwixz considers that syntax too cumbersome. To be honest, I'm not fond of adding just another way to call `value_to`.