The program-wide facilities
cin, cout , and
cerr are special and are implemented specially. A factory has to maintain a registry of what function to call to create a given type, and there is typically one registry for the whole program (but preferably it should be internal to the factory rather than a shared global object; see Item 11).Item 12 and [Sutter04c].)