$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: David Walthall (walthall_at_[hidden])
Date: 2006-09-15 12:09:47
Scott Meyers wrote:
> I'll note that C++ itself allows "uninitialized" objects with 
> constructors to be created all the time:
> 
>    std::ofstream ofs;
>    std::vector<int>::iterator i;
The only time I have found it useful to have default-constructed objects 
that are otherwise unusable is when I need to store them in a map or 
other container that requires a default constructible object.  That 
allows me to use the easier operator[] syntax instead of using insert 
and find.  However, I've begun to view that as a defect in the interface 
of std::map rather than a need to have default constructible objects 
even when they are not usable.
David