Tag Archives: Boost
Today I want to warn you about a bug in Boost.Rational library. This illustrates a certain danger connected with allowing convenience conversions from other types.
Update. The information about boost::hold_any was imprecise. This tool does not work just for any type, but requires that the type provides operators << and >> for writing into and reading it from IOStreams. In this post we will be … Continue reading
Have you ever came across term type erasure in C++? This “pattern” or “technique” is growing more and more popular. In this post I will try to describe what it is. Note that it is something different than a similar … Continue reading
Update. The advice I gave below using Boost.Optional was invalid and potentially bug-prone. It is now changed, to reflect my experience with using Boost.Optional. In this post I wanted to show, by a not-so-short example, how the decision to signal … Continue reading
In one of my previous posts I tried to show how Boost’s value_initialized can be used to make the usage of PODs (POD = “Plain Old Data”) in C++03 a bit easier. In C++11 this is not necessary. The new … Continue reading
One of the fundamental concepts in STL is RegularType. This is more-less what containers expect of their elements: default construction, destruction, copy-ability (copy constructor and copy assignment), movability (move constructor and move assignment), equality (operator==), ordering (operator<). C++ does a … Continue reading