Boost logo

Boost :

Subject: Re: [boost] [shared_array] Why not in C++11 ?
From: Sid Sacek (ssacek_at_[hidden])
Date: 2013-07-08 04:02:49

Andrey Semashev wrote:
> > Sid Sacek wrote:
> >
> > You mentioned in an earlier mail that you would prefer that size()
> > return a value like -1 in such a case. That also feels very strange to
> > me; i.e. returning a size_t but reserving a value like -1 to indicate
> > unknown size.
> +1, I hate magic values.

You are right, I also have a dislike for magic values.

In my last email, I suggested using 0 for unknown buffer sizes. I believe zero
is not a magic number, and it suggests a zero-sized buffer, which is harmless.

-Sid Sacek

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