Boost logo

Boost :

Subject: Re: [boost] [utility/swap] MSVC 10 test failure, unsigned long to std::bitset conversion invalid?
From: Richard Webb (richard.webb_at_[hidden])
Date: 2010-03-06 19:05:22


Niels Dekker - address until 2010-10-10 wrote:
>
>
> Interesting. I only have VC10 beta 1 installed, which does not have such
> a bitset::bitset(int). So the bug was introduced very recently!
>
> Do I understand correctly that bitset::bitset(int) behaves exactly like
> the old bitset::bitset(unsigned long)? Assuming that sizeof(int) ==
> sizeof(unsigned long), of course!
>
>

The change from unsigned long to unsigned long long is a c++0x change (c++98
says the constructor takes an unsigned long, and c++0x changes that to
unsigned long long), and i think it was changed just to allow larger values.

The int constructor looks like an MS special that was added in the release
candidate. I was wondering if it was added to help out with this other bug:

https://connect.microsoft.com/VisualStudio/feedback/details/500122/bitset-5-bits-0-fails-with-conflict-between-longlong-and-char

-- 
View this message in context: http://old.nabble.com/-utility-swap--MSVC-10-test-failure%2C-unsigned-long-to-std%3A%3Abitset-conversion-invalid--tp27804756p27808221.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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