Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-21 08:12:12


Deane Yang <deane_yang_at_[hidden]> writes:

> Matt Calabrese wrote:
>
>> I'd say it's much more analogous to conversions in C++ from a short unsigned
>> int to an unsigned int being implicit. You don't lose any information in the
>> conversion and the conversion makes perfectly logical sense. Forcing users
>> to always be explicit is just making them write more unecessary code.
>>
>
> OK. I think I'll concede that it's my own fetish, bcause I think
> implicit casting of int to unsigned int and vice versa is one of the
> worst "features" of C++.

Matt wasn't talking about that "feature." Note that the implicit
conversion he mentioned is a widening one, which is always okay.

  signed char -> short -> int -> long

etc. Not vice-versa!

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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