Subject: [Boost-bugs] [Boost C++ Libraries] #3659: warning when using boost::counting_iterator<int> and std::vector<int> on MSVC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-23 12:06:48
#3659: warning when using boost::counting_iterator<int> and std::vector<int> on
MSVC
--------------------------+-------------------------------------------------
Reporter: anonymous | Owner: dave
Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: iterator
Version: Boost 1.41.0 | Severity: Cosmetic
Keywords: |
--------------------------+-------------------------------------------------
This code causes the warnings:
#include <boost/iterator/counting_iterator.hpp>
#include <vector>
int main()
{
boost::counting_iterator<int>
begin, end;
std::vector<int> v(begin, end);
return 0;
}
warning C4244: '+=' : conversion from '__int64' to 'unsigned int',
possible loss of data
1> e:\program files\microsoft visual studio
8\vc\include\xutility(1702) : see reference to function template
instantiation 'void std::_Distance2<_InIt,_Diff>(_RanIt,_RanIt,_Diff
&,std::random_access_iterator_tag)' being compiled
1> with
1> [
1> _InIt=boost::counting_iterator<int>,
1> _Diff=unsigned int,
1> _RanIt=boost::counting_iterator<int>
1> ]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3659> 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:01 UTC