1: iterate properly in reverse
The previous code would have malfunctioned for an empty container.
2: swap instead of copy
3: reduce repetition using a lambda function
4: use range-for loops
5: Dot_configuration "has a" instead of "is a" std::map
It is considered poor form to create subclasses of standard containers
because they lack virtual destructors. Inheriting privately from
std::map avoids potential problems by preventing Dot_configuration from
being treated as a std::map from the outside. (I didn't find any actual
problems in this case.)
Limiting the Dot_configuration interface to just the map methods that
are actually used makes it easier to understand how Dot_configuration is
used without searching the entire code.
Diff:
Passes make, make check and a full make doc.
Patch on countdown for Jan 29th
Patch counted down - please push