"Scott Meyers"
I'll note that C++ itself allows "uninitialized" objects with constructors to be created all the time:
std::ofstream ofs;
It's funny how this example is the one always chosen by the proponents of 2 phase construction. Search the newsgroups and you'll find this constructor is the root of many problems encountered by users of streams attempting to operate on an insufficiently intialized stream object.
std::vector<int>::iterator i;
I know, I hate this one too. ;)
std::string s;
This is a properly initialized empty string, analogous to an empty vector.
In each case, there are a few operations that can legitimately be performed on such objects, but many operations lead to UB. Is this fundamentally different from the EventLog example? For example, replace EventLog in my example with ofstream, and you have
std::ofstream ofs; ofs << "Hello World";
What better argument could there be against 2 phase construction? Jeff Flinn