On 01/07/2024 16:16, Дмитрий Архипов via Boost wrote:
пн, 1 июл. 2024 г. в 17:45, Niall Douglas via Boost
: Dear Boost,
The biggest new feature to land into Outcome since it went ABI stable is inline GDB pretty printing support, whereby we embed into all binaries using Outcome the Python script to display the state of `result<>/outcome<>`. As Outcome uses a layered inheritance technique to match triviality of member functions from its configured types, having to click down through the layers to discover the state was always frustrating. MSVC has long shipped with a visualiser to eliminate this, so now support for GDB matches MSVC support.
The relevant implementation file can be found at:
https://github.com/boostorg/outcome/blob/master/include/boost/outcome/outcom...
This is a very neat trick. I have a WIP branch with GDB printers for JSON (https://github.com/boostorg/json/pull/733). The branch hasn't been merged yet mostly because I couldn't decide on the best way to deploy the script. And this trick trivializes that problem
Sorry it's several years late. I had known this was possible for many years, the lack of it had to become painful enough to my work productivity that I could justify using work time to fix it. When the current contract ends I am hoping to reduce how much I work for money in order to get more time to do other useful stuff I've backlogged. If I can afford to do that when the time comes, I shall. Obviously if anybody finds any ways my solution above could be improved before the 1.86 window closes, I am all ears. Niall