Re: Seeking Endorsement: Boost.int128

Matt Borland via Boost <[email protected]>
Newsgroups gmane.comp.lib.boost.devel
Message-ID <LlzNUUns1ZUNa8WhDS0tfkGxHD7G2cG8rW9j8KCHfBozA_YdCFv4JH5Jcf9FHMi6PgCJKXBpmR5kJhk5EQbP97dKcSBG--nAGy-gqnohq7Q=@mattborland.com>
> You could try emitting a warning manually, if you want. There's this
> example, although I don't know how well it works:
> 

> https://www.boost.org/doc/libs/1_91_0/libs/serialization/doc/static_warning.html
> 


Thanks for that. Seems theres a reddit thread with an easy implementation: https://www.reddit.com/r/cpp/comments/66o1ju/does_a_static_warn_exist/.

> Then you would provide user with a macro to disable the warning. This
> would be better than disabling the operators by default.
> 

> However, my complaint was not about warnings but about the behavior when
> the operators are enabled by defining the
> BOOST_INT128_ALLOW_SIGN_COMPARE/BOOST_INT128_ALLOW_SIGN_CONVERSION
> macro. When the comparison operators are enabled, their behavior differs
> from the built-in ones, and I think this is a problem.
> 


Seems as though Alexander and Peter have both agreed with you since my last response. I'll make the changes, and see if the static warning can be made to work in some fashion.

> >
> > For an operation between a builtin and a int128 type of opposite sign, the builtin will be cast to the int128 type. These sign conversions match the behavior of __(u)int128_t. I will edit these sections to make them more clear.
> 

> Thanks, but do note that for an operation taking int128_t and uint128_t
> (in any order), int128_t is always expected to be converted to
> uint128_t. Is this expectation correct?
> 


Yes, that is correct.

Matt

_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/OLVATATORN2SBPEY7RWAYPMVHGIOKVYU/
publickey - [email protected] - 0xC1382EAD.asc (application/pgp-keys, 653 B)
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEX2wgdBYJKwYBBAHaRw8BAQdAUHOh0KpbZCszhdvKztWj4C6FR1ozMBQE
waBi3m2PJHLNK21hdHRAbWF0dGJvcmxhbmQuY29tIDxtYXR0QG1hdHRib3Js
YW5kLmNvbT7CjwQQFgoAIAUCX2wgdAYLCQcIAwIEFQgKAgQWAgEAAhkBAhsD
Ah4BACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaVWuwEA77rm
OA4TB6Xxe6q8gI42bEICMhMyZKSMcakz39/djYkBAMJOG+IGQC/d0n3dsl10
Kg/oxX88kFO1oPKn4/XW+ToBzjgEX2wgdBIKKwYBBAGXVQEFAQEHQOsmo6wR
UuXRAvFIiqmQkzYrPyvKYKna2z4ZtmnTQMkMAwEIB8J4BBgWCAAJBQJfbCB0
AhsMACEJEFmBWlVCFaWlFiEEwTgurTcoHwbdSbIsWYFaVUIVpaWUJwEA5G0c
ZRnG5WGNErI+y90iQrTv02i4Ivhv7twoFcLD/zwA/jKypw+vehE99mEj1/uI
EkoDFlNzQZqNldbjRcPyI5UH
=462S
-----END PGP PUBLIC KEY BLOCK-----
signature.asc (application/pgp-signature, 343 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wrsEARYKAG0Fgmnx+sUJEFmBWlVCFaWlRRQAAAAAABwAIHNhbHRAbm90YXRp
b25zLm9wZW5wZ3Bqcy5vcmdcb2ZfE3eKjotLqF6g794OUmUho5zf3fG1oqUx
zNGPORYhBME4Lq03KB8G3UmyLFmBWlVCFaWlAACxywD/f7l3MsbnjoCQfEfJ
NGP6ctwTLMdDcD0ipJK+j+EByNoBALP6bwtHzB6FkxS5kfAuFRzIAnA/kOKP
fS/H07GCSdQA
=H/A7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.