Boost logo

Boost Users :

From: Jonathan Oulds (jonathan.oulds_at_[hidden])
Date: 2004-07-21 13:40:02


> How about clearer code:
>
> //what does it do -- non-obvious
> date d;
> std::cout << d << std::endl;
>
> //obvious...
> date d(not_a_date_time);
> std::cout << d << std::endl;
>

surely coding a default constructor does not prevent you from writing:

     date d (not_a_date_time);

it just gives you the option of not doing so, eg. in generic code that
requires a default constructor to be present, and anyway you can always
comment those non-obvious lines of code for those who do not know how
the library works.

jonathan.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net