Subject: Re: [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: 2011-06-04 22:42:37
#3659: warning when using boost::counting_iterator<int> and std::vector<int> on
MSVC
---------------------------+------------------------------------------------
Reporter: anonymous | Owner: dave
Type: Bugs | Status: closed
Milestone: Boost 1.42.0 | Component: iterator
Version: Boost 1.41.0 | Severity: Cosmetic
Resolution: invalid | Keywords:
---------------------------+------------------------------------------------
Changes (by dave):
* status: reopened => closed
* resolution: => invalid
Comment:
Replying to [comment:2 Sergey Mitsyn <svm at jinr.ru>]:
> The warning still doesn't go when the difference type is explicitly
specified instead of the default:
>
> Maybe it's OK to assume that if a user specifies the difference type
explicitly, he/she knows what he/she is doing and use static_cast to {{{
Difference }}}?
Maybe the warning is a good thing. I object most strongly to introducing
casts to suppress warnings, especially in libraries: casts hide bugs. If
you can find a way to make the warning go away without casting, I'll
accept a patch. Otherwise, I think the compiler may be telling you that
you're doing something you shouldn't do, and this is not a bug in the
library.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3659#comment:5> 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:06 UTC