This is a guest post by Anton Vodostoev. Anton is a C++ developer and follower of Fluent C++. I liked the idea of creating different types of smart iterators when reading the articles “About Smart Output Iterators” by Jonathan. One of them suggested me an idea I wanted to talk about. The problem Imagine we […]
Have you ever used std::inserter to insert the outputs of an STL algorithm into a sorted container such as an std::set? And if you have, weren’t you annoyed by how its interface forces you to specify the position to insert the elements in the set? I find this very annoying, because most of the time we have […]
When you start using the STL and its algorithms in your code, it’s a bit of a change of habits. And then after a while you get used to it. Then it becomes a second nature. And then even your dreams become organized into beautifully structured ranges that fly in and out of well-oiled algorithms. […]
The inserter iterators such as std::back_inserter and std::inserter are important components in the STL that participate in letting us improve the expressiveness of our code. Here we delve into std::inserter. We’ll start with a basic question concerning how it can work, have a peek at the inside, and answer that question. This will make us better understand […]