Boost logo

Boost :

Subject: Re: [boost] [uuid] Interface
From: David Abrahams (dave_at_[hidden])
Date: 2008-12-22 18:18:21

on Fri Dec 19 2008, "Vladimir Batov" <> wrote:

> It seems I did it again. :--( Just noticed that I misread the following excerpt of
> Scott's email. Apologies and corrections further below.
>>> Take, for example, a map<string, uuid>. No default constructor means
>>> that you can't use operator[],
> First, my preference is to *have* the default constructor -- we disagree on its
> behavior as I'd like the default constructor to *be part* of the constructors family
> (constructing a valid object) and you insist on the default constructor being an
> exception.

I think the terminology "valid object" is misleading here. A NULL
pointer is valid. An uninitialized pointer is... marginally valid. I
don't think anyone is suggesting that uuid() should produce an object
that can only be assigned to or destroyed.

> The latter is not how the language interprets the default constructor.

I can't imagine what you mean by that.

> Therefore, me not happy. IMHO that deviation of the meaning from the
> letter of the language is unacceptible.
> Second, even if I cannot use operator[], so what? std::fstream has no default
> constructor. std::list has no operator[], std::vector has no push_front(). That did
> not stop anyone from using those classes. What the lack of those
> "features"

Do you really mean to imply that push_front, operator[], et. al. are not
legitimate features?

Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at