2 ms·
I don't see how this is in any way preferable to having an ordinary default constructor that does the same thing: // There are a few ways to let API caller
by usefulcat 5mo ago
I don't see how this is in any way preferable to having an ordinary default constructor that does the same thing:
// There are a few ways to let API callers bring their own
// memory, as they would in a no-malloc environment and this
// stack-friendly c'tor is a stand-in for that.
static Birthdate epoch() { return Birthdate(1900, 1, 1); }
- deleted 5mo ago[deleted]
- plorkyeran 5mo agoSome readers will expect Birthdate() to be equivalent to Birthdate(0, 0, 0), and naming it Birthdate::epoch() makes it clear that it is not that. I don't think it's worth it, but there is an upside.