Opened 10 years ago

Closed 10 years ago

#7699 closed Support Requests (fixed)

theres no way to solve that for the hash function : warning C4244

Reported by: anonymous Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.50.0 Severity: Problem
Keywords: warning fix Cc:

Description

warning C4244: 'argument' : conversion from 'std::streamsize' to 'size_t', possible loss of data compiling this: basic_binary_iprimitive.hpp

example code: namespace boost {

template <> struct hash<ATypeHere> {

inline size_t operator()(const ATypeHere & obj_p ) const {

return something

}

};

}

If you change size_t to std::streamsize, you will get the exactly same warning, but inverted (in a different place)

Change History (3)

comment:1 by anonymous, 10 years ago

Summary: theres no way to solve that for the hash function : C4244theres no way to solve that for the hash function : warning C4244

comment:2 by Robert Ramey, 10 years ago

hmmm - think i've fixed this - but I can't tell from the description here. For now I'm going to close this ticket pending more information.

RObert Ramey

comment:3 by Robert Ramey, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.