In the spelling corrector article we read a whole file in memory and hold it’s data in a std::string object, and then we use a std::map to hold ranges of this big string. Those ranges are created by making copies of the string. While this aproach is satisfatory, it can be greatly improved if we can afford holding the file data while std::map is in the scope.
I did a filter_iterator for C++ STL containers which is able to filter container elements based on a predicate, wich I have showed to my friend Thiago Adams. Then he pointed me a CUJ (C/C++ Users Journal) article where Maciej Sobczak introduced the Container View Concept. The main idea behind it is that it is able to move elements without really copying them and being able to integrate multiple container elements in just one view.
I wrote a C++ version of the Norvig’s spelling corrector. The theory and other language implementations are in his website, and my version can be found at my github: