|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-07-21 13:44:06
"Peter Dimov" <pdimov_at_[hidden]> writes:
> David Abrahams wrote:
>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>
>>> Victor A. Wagner Jr. wrote:
>>>> why would you want such a thing?
>>>
>>> Typically, in order to let generic code that needs a default
>>> constructor to work unmodified on date/time values.
>>
>> Is there much generic code out there that works only on default
>> constructible objects whose other concept requirements are satisfied
>> by dates?
>
> I can only give one example: serialization.
>
> The real question is: do the benefits (none from my POV) gained by _not_
> supplying a default constructor outweigh the disadvantages?
If not_a_date_time is a possible value regardless of whether a default
ctor is provided, I guess I can't argue "simpler/stronger invariants".
But otherwise, I would argue "simpler/stronger invariants" :)
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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