Re: [Boost-bugs] [Boost C++ Libraries] #13503: Boost.Multiprecision generates incorrect code

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13503: Boost.Multiprecision generates incorrect code
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-03-30 16:25:28

#13503: Boost.Multiprecision generates incorrect code
  Reporter: Sam Lunt <samuel.j.lunt@…> | Owner: John Maddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.64.0 | Severity: Problem
Resolution: | Keywords:

Comment (by John Maddock):

 This was deliberate, but on reflection is a mistake.

 The issue is in the narrowing conversion from 128 to 64 bit integer - you
 are relying on this being truncation, but there's nothing in the standard
 to specify or guarantee that - instead it's implementation defined
 behaviour and is permitted to vary by compiler and/or platform.
 Boost.Multiprecision's default interconversion functions convert a value
 that would overflow the destination type to the maximum value that type
 can hold. This part is the mistake for unsigned integers (and only for
 unsigned integers) which should probably follow the common practice of

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-03-30 16:31:51 UTC