Opened 9 years ago
Closed 8 years ago
#9936 closed Bugs (fixed)
multiprecision assign does not deal addequately with sign
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | multiprecision |
| Version: | Boost 1.55.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The following code provides the output:
0
-0
Looks like the positive sign is not set after assign is called.
#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
boost::multiprecision::int128_t x("0");
int main(int argc , char **argv) {
std::cout << x << std::endl;
x = -1;
x.assign("0");
std::cout << x << std::endl;
}
Change History (4)
comment:1 by , 9 years ago
| Component: | None → multiprecision |
|---|---|
| Owner: | set to |
comment:2 by , 8 years ago
comment:4 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

I'm unable to reproduce by either current Git develop or Boost-1.55, which compiler/platform is this?