On Tuesday, March 06, 2012 17:00:19 Brad Anderson wrote: > I wasn't around for the creation of datetime but I'm curious why a boost > datetime-like duration construction shortcut approach to durations wasn't > used. That is, you can write weeks(1), months(6), years(10), hours(17), > minutes(12), etc. (although there is now days(int) for some reason).
Because then you've got incredibly common names used as top-level symbols. It's also not generic at all. As it stands, you can have a function which does dur!units(value). You can't do that with weeks(1), months(6), etc. - Jonathan M Davis