Boost Users :
Subject: Re: [Boost-users] [boost.multiprecision] export_bits throws on a negative number
From: John Maddock (jz.maddock_at_[hidden])
Date: 2016-04-28 12:59:40
On 28/04/2016 16:40, Tassilo Glander wrote:
> Hi John,
> thanks for stepping in. I would expect that the export just exports the memory representation of the number - maybe with flipped order via msv_first parameter. Especially, something exported via export_bits and than imported via import_bits should be the same, at least on the same platform.
> That said, I actually was just looking for a way to implement a hash function and thought it was straightforward to use chunks of char. But I could also compute the hash on the str() output.
You could use str() but it's a rather inefficient way to go, I should
probably add specializations for boost::hash and std::hash.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net