Boost logo

Boost :

From: Steven Kirk (steven.kirk_at_[hidden])
Date: 2003-01-17 10:23:05


> > Default Construction
> > --------------------
> > It would be useful if default constructors for gregorian::date and
> > posix_time::ptime were provided. The default constructors could maybe
work
> > as follows:
> >
> > gregorian::date() ==> gregorian::date(not_a_date_time)
> > posix_time::ptime() ==>
posix_time::ptime(gregorian::date(not_a_date_time),
> > time_duration(0, 0, 0))
>
> There has been some recent discussion on this very issue, so
> here are a couple boost-user archive links:
>
> This one shows you how you can create your own default
> constructor:
>
> http://groups.yahoo.com/group/Boost-Users/message/2701
>
>
> At least one user wanted this at first, but after using the library
> for awhile decided it wasn't really necessary. See:
>
> http://groups.yahoo.com/group/Boost-Users/message/2705
>
>
> I didn't put these in because I never felt comfortable
> about choosing the default values.
>
Hmmm while I can see your point, I still think a default constructor should
be provided. And as I, along with all of the users in the messages you cited
seemed to have expected that default constructed dates would be set to
'not_a_date_time', I'd suggest that this would be the most sensible default
value. I don't see any point in *not* providing a default value.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk