Constrain your user-defined conversions -- Jonathan Mueller
Sometimes you want to add an implicit conversion to a type. This can be done by adding an implicit conversion operator. For example, std::string is implicitly convertible to std::string_view.
Constrain Your User-Defined Conversions
By Jonathan Mueller
From the article:
Sometimes you want to add an implicit conversion to a type. This can be done by adding an implicit conversion operator. For example,
std::stringis implicitly convertible tostd::string_view:class string { // template omitted for simplicity public: operator std::string_view() const noexcept { return std::string_view(c_str(), size()); } };The conversion is safe, cheap, and
std::stringandstd::string_viewrepresent the same platonic value — we match Tony van Eerd’s criteria for implicit conversions and using implicit conversions is justified.However, even when all criteria are fulfilled, the conversion can still be dangerous.

In my last post "Monitor Object" I implemented a thread-safe queue. I made two serious errors. Sorry. Today, I will fix these issues.
This article goes over the spicy topic of object ownership. We covered the lifetime quirks, and we found out that manual memory management can be a nightmare, we 
Visual Studio 17.6 comes with new functionality in the Address Sanitizer runtime which provides a new “checked build” for C and C++. This new runtime mode diagnoses and reports hidden memory safety errors, with zero false positives, as your app runs.
The latest major version of the
The active object design pattern decouples method execution from method invocation for objects that each reside in their own thread of control.The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.
A few years ago, I showed an interesting implementation for self-registering classes in factories. It works, but one step might be at the edge of Undefined behavior. Fortunately, with C++20, its new constinit keyword, we can update the code and ensure it’s super safe.