On Wed, 21 Jul 2004 21:00:00 +0300, Peter Dimov wrote
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.
boost::serialization doesn't require a default and we wrote date_time serialization code so that it doesn't use the default constructor. Requiring a default constructor is, however, a weakness of many serialization frameworks...
The real question is: do the benefits (none from my POV) gained by _not_ supplying a default constructor outweigh the disadvantages?
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; Personally, that's enough for me... Jeff