Subject: [Boost-bugs] [Boost C++ Libraries] #9658: int from size_t conversion warning in hashed_index.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-11 20:47:18
#9658: int from size_t conversion warning in hashed_index.hpp
-------------------------------------+-------------------------
Reporter: mbradle@⦠| Owner: joaquin
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_index
Version: Boost Development Trunk | Severity: Cosmetic
Keywords: |
-------------------------------------+-------------------------
Hello,
When I compile libs/multi_index/example/hashed.cpp with
g++ -Wconversion -I../../.. -o hashed hashed.cpp
I get the conversion warning:
hashed.cpp:103:45: instantiated from here
../../../boost/multi_index/hashed_index.hpp:1343:21: warning: conversion
to 'int' from 'size_t' may alter its value
When I apply the patch in diff.txt (attached), the code compiles without
the warning. The patch also includes the change on line 1399.
Best wishes,
Brad
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9658> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC