Ticket #8748 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

Warning: implicit conversion loses integer precision

Reported by: Jan Bouwer <JBouwer@…> Owned by: johnmaddock
Milestone: To Be Determined Component: multiprecision
Version: Boost Development Trunk Severity: Problem
Keywords: warning Cc:


Trivial - Full error message:

boost/multiprecision/cpp_int.hpp:1614:23: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
         unsigned n = result.find_first_not_of('0');
                  ~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

produced by clang (Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)) from svn #84915.


boost_multiprecision_cpp_int_warning.patch Download (436 bytes) - added by Jan Bouwer <JBouwer@…> 2 years ago.
Patch suggestion

Change History

Changed 2 years ago by Jan Bouwer <JBouwer@…>

Patch suggestion

comment:1 Changed 2 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

(In [84922]) Change to use std::string::size_type rather than unsigned. Fixes #8748.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.