On 09.08.2013, at 19:46, Chandler Carruth <[email protected]> wrote:
> > On Fri, Aug 9, 2013 at 10:17 AM, Benjamin Kramer <[email protected]> > wrote: > Add a convenient way to compare GCCVersions without creating temporary > objects. > > Er, is this really better? I don't find it more readable. - static const GCCVersion MinVersion = { "4.1.1", 4, 1, 1, "" }; - if (CandidateVersion < MinVersion) + if (CandidateVersion.isOlderThan(4, 1, 1)) The list initializer version mentions the version number twice, I found that really ugly and the version string isn't used at all. I guess we could always call GCCVersion::Parse if we don't care about performance (I don't think this code is hot). - Ben _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
