Subject: Re: [boost] Official warnings policy?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-11-12 18:46:04
Patrick Horgan wrote:
> Stewart, Robert wrote:
> > Shouldn't the test confirm that an int can be assigned to a
> > short in a variant and that the resulting short has the same
> > value as when the same int is assigned to a short not in a
> > variant? That test need not produce a warning because
> > comparing the results from the two assignments proves or
> > disproves the behavior of variant.
> The point of the warning is that it is not guaranteed that
> the resulting
> short will have the same value. On my machine the maximum value of a
> short is 65535, and of an int is 18446744073709551615. That leaves
> 18446744073709486080 values for which the resulting short
> will truncate
> the int value and only 65536 which wouldn't. If you wanted
> to be able
> to use int like this with variant, you'd have to change the design of
> variant. If it's a requirement that this work, then you'd file a bug.
I understand all of that quite well. The test being discussed assigns 58.
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