Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-31 08:30:30


"Paul A. Bristow" <boost_at_[hidden]> wrote in message
news:AHEJIHEOOOBMJPAGPLIPAEOAEIAA.boost_at_hetp.u-net.com...

> I agree that you have to make a special effort to switch the compiler
warnings
> on
> (for MSVC enabling level 4 - and it can be made the 'default' for new
projects
> with some twiddling).

it's more than that. there is no guarantee it will happen.

> I have never used unsigned to get more range - although it does, and is
used by
> standard library items, drawing on, for example:
>
> typedef basic_string <char>::size_type size_type;
>
> or
>
> using basic_string <char>::size_type;
>
> Isn't this what we should use more often?

there is nothing wrong with a nested typedef; the problem is that the type
is unsigned.

I would like people to read the two threads and make up their own mind. I'll
probably take more than an hour to do so, but then
you would be able to comment on my long list that I think proves unsigned
should be avoided.

There is one more who favors signed which I forgot to mention: John Lakos.

best regards

Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk