[Boost-bugs] [Boost C++ Libraries] #11034: boost::iostreams::copy: conversion from 'std::streamsize' to 'int'

Subject: [Boost-bugs] [Boost C++ Libraries] #11034: boost::iostreams::copy: conversion from 'std::streamsize' to 'int'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-16 15:24:27


#11034: boost::iostreams::copy: conversion from 'std::streamsize' to 'int'
------------------------------+-----------------------
 Reporter: polkovnikov.ph@… | Owner: turkanis
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 When using <boost/iostreams/copy.hpp> in VS 2013 Update 2, I've got

 boost\iostreams\copy.hpp(128): warning C4244: 'argument' : conversion from
 'std::streamsize' to 'int', possible loss of data

 I'm passing `ifstream` through `copy` to Poco SHA1, and the files are more
 than 2 GB long. It is not easy to tell if hashes for the files are
 correct, but from source code it seems that they are not.

 The strange row "size_(buffer_size) // Cast for SunPro 5.3." looks like it
 was made deliberately to fix some other bug.

 Trying to hotfix this bug I run into a problem, that the type should be
 std::streamsize and std::size_t simultaneosly. size_t is required by
 std::allocator::allocate. I've found similar problem here:

 https://svn.boost.org/trac/boost/ticket/7873

 Unfortunately I don't understand the code well enough to workaround that
 allocator parameter issue.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11034>
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:17 UTC