Michael Jones

Results 154 comments of Michael Jones

EDIT: Nevermind the below, I found execute.h, which does what I want. ---------------------------------------------------- I see in `request.h` that all of the overloads of `request_op::operator()` require an `Out` parameter. Is there...

```cpp auto res = std::make_unique(); ozo::request(conn_info[io], query, 1s, ozo::into(*res), [res=std::move(res)] (ozo::error_code ec, auto conn) { if (ec) { log_error(ec); return; } process_result(*res); } ``` I ended up making a helper...

Added another requested example: > 12. An example of mapping a complex type, like nlohmann::json's json object type, to the result of a query. The existing how-to shows how to...

> That's a good choice. The only thing I suggest for you is using a functional object instead of lambda, to preserve original handler associated executor and allocator: Do you...

Here's an allocator aware result_wrapper struct, based on your suggestion. ```cpp template struct result_wrapper { using executor_type = boost::asio::associated_executor_t; using allocator_type = typename boost::asio::associated_allocator::type; using handler_alloc_traits_t = std::allocator_traits; using return_alloc_t...

This is how I implemented the deleter. Unfortunately your example wasn't complete. allocator_traits::allocate require lvalue-reference to allocator, so can't be used in the manner you demonstrated. ```cpp template struct result_wrapper...

Is that something you would accept as a PR? For now I've had to disable the -Wfallthrough warning. Which I didn't want to do, but having the warning free build...

I don't really follow your answer. What code from ozo would throw?

I'm not currently seeing any exceptions from ozo, no. I'm asking because I'm trying to make improvements to my code that uses ozo, and part of that is investigating exception...

Another option that is significantly more work is to use the noexcept(noexcept(list-of-function-calls-here)) logic that can calculate whether a particular customization point is marked as noexcept by the caller at compile...