Using std::expected from C++23 -- Bartlomiej Filipek
In this article, we’ll go through a new vocabulary type introduced in C++23. std::expected is a type specifically designed to return results from a function, along with the extra error information.
Using std::expected from C++23
by Bartlomiej Filipek
From the article:
Imagine you’re expecting a certain result from a function, but oops… things don’t always go as planned:
/*RESULT*/ findRecord(Database& db, int recordId) { if (!db.connected()) return /*??*/ auto record = db.query(recordId); if (record.valid) { return record; return /*??*/ }What can you do? What should you return or output through/*RESULT*/?

A new episode of the series about SObjectizer and message passing:
A new episode of the series about SObjectizer and message passing:
Thanks to the powerful
This article explores the concept of class invariants in C++ and their significance in maintaining code integrity and abstraction. It highlights the difference between struct and class definitions and discusses the role of class invariants in guaranteeing the correctness of class objects. The article also touches upon the trade-offs between strong and weak invariants and provides insights into when to define a new class with proper invariants.
A new episode of the series about SObjectizer and message passing:
In this post, Victor talks about bringing compile times of the {fmt} library on par with the C standard I/O library (stdio).
In this software troubleshooting case, a customer experienced program crashes, and a detailed analysis of the code revealed several issues. The primary problem stemmed from lazy initialization of a widget list, leading to inconsistent vector states and potential crashes. Additionally, a multithreading issue was identified, highlighting the importance of thread-safety mechanisms in code that can be accessed concurrently.