Boost logo

Boost :

Subject: Re: [boost] [utility/swap] MSVC 10 test failure, unsigned long to std::bitset conversion invalid?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-08 07:29:57


Niels Dekker wrote:
> On 2010-03-07 12:39, Joseph Gauterin wrote:
> > [...] I'd be more inclined to mark the test as an expected
> > failure on the MSVC10 than change the test itself.
>
> [ I replied: ]
> > Actually I have considered this approach as well, but I
> > changed my mind. Because it's not the purpose of
> > libs/utility/swap/test/std_bitset.cpp to test the
> > initialization of an std::bitset. Its purpose is to test
> > whether boost::swap correctly swaps two different
> > std::bitset objects:
> [...]
> > How those initial_value1 and initial_value2 are actually
> > initialized is irrelevant to the test. However,
> > std_bitset.cpp should test whether boost::swap does the
> > right thing, on any platform, including Microsoft Windows
> > + VC 10.
> >
> > Hope you agree. But please let me know if you still object
> > against the workaround, which just replaces "1ul" by "1",
> > and "2ul" by "2":

I agree that your test isn't about initialization, but I'd have thought the better thing would be to conditionally compile MSVC 10 initialization logic to avoid breaking any other working platform.

> So I just committed that little modification of std_bitset.cpp to the
> trunk: https://svn.boost.org/trac/boost/changeset/60331
>
> My idea is just to look at the regression page for a week or
> so, to see if it doesn't cause any other test failures.
> Otherwise, we have to do something else....

Watching for regressions is certainly good, but I still think you would be wise to apply an initialization workaround for the failing platforms and leave the rest alone.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


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