"Peter Dimov"
David Abrahams wrote:
"Peter Dimov"
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