Boost logo

Boost Users :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2004-07-21 00:55:28

At Tuesday 2004-07-20 14:20, you wrote:
>"Jeff Garland" <jeff_at_[hidden]> writes:
> > On Tue, 20 Jul 2004 21:30:04 +0100, Jonathan Oulds wrote
> >> Could anyone explain to me why there is not a default constructor
> >> for boost::gregorian::date_time and boost::posix_time::ptime.
> >
> > Yes, you can see this thread:
> >
> >
> >
> >> I implemented a simple constructor where both classes are created
> >> as 'not_a_date_time'. The only problem I have had is compiling my
> >> code on other peoples machines that do not have my modification to
> >> the date_time library.
> >
> > I've given in to user demand -- the default constructor to
> > not_a_date_time will be in the 1.32 -- gregorian::date same story.
>Why was that the right choice? It seems like an opportunity for bugs.

seems that way to me also.
that C polluted the programming world with the default uninitialized
variables (they really shoulda paid more attention to BCPL, at least you
had to say = ? if you meant to leave it alone), and C++ followed (so,
purportedly, us 'old farts' would use the language) is NO reason to follow
down a bad path.
if people want not_a_date_time as the value, let 'em use an explicit
constructor to say so!

>Dave Abrahams
>Boost Consulting
>Boost-users mailing list

Victor A. Wagner Jr.
The five most dangerous words in the English language:
               "There oughta be a law"

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at