There is proposal for status_value<Status, Value>
class. This class is practically a syntax sugar on top of
pair<Status, optional<Value>>
, in other words it is an optional value enriched with non-optional status.
Continue reading
Imagine that you got a named temporary object and you would like to allow the move semantics is applied to the object’s data member. You definitely need to force move semantics with std::move()
but you have two options how to put it:
Continue reading
Some of my readers may say that mentioning Scott Meyers in the title is a dirty trick, and I partially agree :)
The idea of this post came to me when I was reading Scott Meyers’ great book
Effective Modern C++.
In this post I try to improve Scott Meyers’s C++11 PIMPL (The book’s item 22: When using the Pimpl Idiom, define special member functions in the implementation file)
using an idea taken from the Rule of Zero.
Continue reading