#9658 closed Bugs (fixed)
int from size_t conversion warning in hashed_index.hpp
Reported by: | Owned by: | Joaquín M López Muñoz | |
---|---|---|---|
Milestone: | To Be Determined | Component: | multi_index |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Cc: |
Description
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
Attachments (1)
Change History (3)
by , 9 years ago
follow-up: 2 comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thank you Brad, fixed at
https://github.com/boostorg/multi_index/commit/97187ae4493228465f6bd8c197620185436685ba
comment:2 by , 9 years ago
Replying to joaquin:
Thank you Brad, fixed at
https://github.com/boostorg/multi_index/commit/97187ae4493228465f6bd8c197620185436685ba
A belated thanks! Best wishes.
Brad
possible patch