Boost logo

Boost :

From: Bo Persson (bop_at_[hidden])
Date: 2005-01-17 14:31:26


"Victor A. Wagner Jr." <vawjr_at_[hidden]> skrev i meddelandet
news:6.2.0.14.2.20050117084004.041befd8_at_mail.rudbek.com...
> At Monday 2005-01-17 02:19, you wrote:
>>Sorry, wrong example. Should have been
>>
>>cout << strlen("");
>>
>>or
>>
>>cout << vector<int>().size();
>>
>>which both give me warnings with /Wp64
>>
>>warning C4267: 'argument' : conversion from 'size_t' to 'unsigned
>>int',
>>possible loss of data
>
>
> IMO this falls directly in Dinkumware's lap. ALL of the code was
> written by them (well the headers).
> It's fairly clear that there should be no restrictions on outputting
> the return from .size()

And there isn't.

The compiler chooses one of the gazillion overloads of operator<< for a
32 bit value, and then informs us that it wouldn't be the proper one to
use for a 64 bit value. Duh!

The feature is just broken. Why not use the proper 64 bit compiler for
the 64 bit tests?

Bo Persson


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