Of course, this will work and will be valid.
Explanation
All data members and databases are already built by the time you launch your ctor-body and:
[n3290: 12.7/4] Member functions , including virtual functions (10.3), can be called during construction or demolition (12.6.2). [..]
Do not confuse with:
[n3290: 12.7/1] For an object with a non-trivial constructor related to any non-static member or base class of the object before the constructor, the execution of the results starts in undefined behavior .
(NB. "Before the start of the constructor", this paragraph does not apply here.)
And there is nothing in 12.8 "Copying and moving class objects" to deny assignment at build time.
Caveat
Note that this does not mean that the object began its "lifetime":
[n3290: 3.8/1]: The lifetime of an object of type T begins when:
- stored storage with proper alignment and size for type
T and - If the object has non-trivial initialization, its initialization is complete.
And the last step in the "initialization" for non-delegating ctor:
[n3290: 12.6.2/10]: [..] Finally, the compound instruction of the constructor body is executed.
In general, this means that the "lifetime" object does not start until it completes the execution of its derived constructor body.
In particular, passing a pointer to an object before it begins its life is not very useful, since almost everything that calls through this pointer undefined Behavior:
[n3290: 3.5/8]: Before the life of the object begins, but after the storage that will occupy the object is allocated or, after the end of the life of the object and before storage that the occupied object is reused or freed, any pointer that refers to the storage location where the object will be or was located can be used, but only in a limited way. [..]
But:
[n3290: 3.8/3]: [..] [Note: [..] In addition, the behavior of an object under construction and destruction may not be the same as the behavior of an object whose lifetime began and did not end. 12.6.2 and 12.7 describe the behavior of objects during construction and the phases of destruction. -end note]
And, as we have already found out, 12.7 kindly informs us that members can be available at this stage of construction.
Sentence
However, your approach is hard to follow; I also had to look at the above passage before I could make sure it was valid, so it was clearly not completely intuitive.
Fortunately, C ++ 0x represents a constructor delegation so you can write:
struct Year { Year() : Year(1970) {} Year(int y) : year(y) {} int year; };
(Alas, GCC 4.5.1 does not support this, so I cannot demonstrate it to you at ideone.com . In fact, for GCC as a whole, there is only a “partial patch” at the time of writing .)