Hey, it’s Vinnie here again! I have some very exciting news to share with you. The renovated website for Boost that we’ve been working on for far too long is now going into its Public Beta phase! Feel free to poke around and kick the tires but keep in mind this is a piece of software and it is still under development. Some parts are missing, incomplete,or buggy. Without further ado: https://boost.revsys.dev This public beta will extend for at least 10 weeks as we finish the last remaining f...
Greetings! I’m Vinnie Falco, Boost library author, C++ enthusiast, and the founder of The C++ Alliance, a 501(c)(3) non-profit. While some of you are enjoying the C++Now conference this week, I’d like to share some background on our organization and some history, outline a vision and goals for C++ and Boost, and solicit your feedback and support. How It Started I took notice of the C++ Standards Committee (“WG21”) while I was writing Boost.Beast in 2016. Howard Hinnant, a co-workers at Ripp...
Since asio added and beast implemented per-operation cancellation, the way timeouts can be implemented in asio code has changed significantly. In this article, we’ll go from simple timeouts to building our own timeout completion token helper. Cancellation A timeout is a defined interval after which a cancellation will be triggered, if an action didn’t complete by then. Timeouts can be a way of handling runtime errors, but one should generally be prudent about their usage. Indiscriminate a...
Asio deferred Aysnc operations Asio introduced the concept of an async_operation, which describes a primary expression that can be invoked with a completion token. In C++20 this is also a language concept. asio::io_context ctx; asio::async_operation auto post_op = [&](auto && token){return asio::post(ctx, std::move(token));}; auto f = post_op(asio::use_future); ctx.run(); f.get(); // void Async operations can be used in parallel_group and directly co_awaited in C++20. asio:...
New Library: Url Boost.url has been released. And it’s awesome. Json & Describe Boost.json is now integrated with Boost.describe. That means that any class, struct, or enum that has describe annotations can be directly serialized to and from json. You can fine examples here. Additionally, variant2 is also supported. Unordered Unordered got a new map type, unordered_flat_map, and the corresponding set type unordered_flat_set. These two containers lay out the map in a flat array, i...