0

Not sure what is causing the following warning which, as I read, can be safely ignored 32 bit:

conversion from 'std::streamsize' to 'size_t', possible loss of data

I am performing routine Boost serialization and the program is working great. The only problem is the compiler has a problem around the following code:

while compiling class template member function 'void boost::archive::basic_binary_iprimitive<Archive,Elem,Tr>::load_binary(void *,size_t)'

Any idea what is up with this?

user633658
  • 2,463
  • 2
  • 18
  • 16

1 Answers1

1

std::streamsize is a signed integral type. size_t is the unsigned integer type.

That's an unsafe conversion because it may cause data loss. The compiler detects an unsafe conversion and issues a warning.

Grigorii Chudnov
  • 3,046
  • 1
  • 25
  • 23