Polymorphism: steady mode vs. initialization mode

You can find this kind of paragraph (about the advantages of runtime polymorphism, ed.) in any book teaching object-oriented techniques. The reason it is repeated here is to contrast the nice state of affairs in "steady mode" with the unpleasant "initialization mode" situation in which you must create objects in…

Remastered std::enable_if

While we wait for Concept Lite to find its way into the standard, here's a nice way of using SFINAE.…

Algorithms and value semantics

A nice consideration on value semantics and STL/boost algorithms: In generic implementations of algorithms it is preferred to use value semantics: copying an object causes two identical objects to exist which are independent. This is crucial property when it is necessary to duplicate objects. Dynamic polymorphism doesn't immediately work…