Chapter 18. Intermezzo: Constructor Clashes and Design That Is, If Not Bad, At Least Ill-Conceived for Seamless Evolution

 

Good design adds value faster than it adds cost.

 
 --Thomas C. Gale

At this point, I must confess that the constructors shown in Listing 17.8 and described in Section 17.3.5 are not actually the real form. To understand the actual form and the reasons for differing from the ideal presented earlier, we must consider the history of the class.

The original version of the class had just two, non-template, constructors:

glob_sequence(char_type const*  directory
            , int               flags = noSort); //  NT1
glob_sequence(char_type const*  directory
            , char_type const*  pattern
            , int               flags = noSort); //  NT2

For good or ill, this means that updates to the ...

Get Extended STL, Volume 1: Collections and Iterators now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.