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-05 13:58:21
#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:
---------------------------+------------------------------------------------
Comment (by Sergey Mitsyn <svm at jinr.ru>):
Replying to [comment:7 dave]:
> Replying to [comment:6 Sergey Mitsyn <svm at jinr.ru>]:
>
> > What I'm thinking about now is the fact that Dinkumware used 32-bit
integer for 32-bit machine architecture instead of 64-bit, thus ignoring
the requirement to represent any difference, as Steven stated above. Maybe
Boost could also switch to using 32-bit ptrdiff_t with the same reason as
Dinkumware does, at least for MSVC?
>
> {{{ptrdiff_t}}} is supplied by the standard library (i.e. Dinkumware)
and not defined by Boost. We use whatever definition we get from the
library.
Sorry, I meant switching from intmax_t to ptrdiff_t, not redefining
ptrdiff_t. What I meant to say is that {{{boost::counting_iterator}}}
should move away from 'no-overflow' strategy, at least for MSVC + x86 and
x64, because it would be more consistent with the Dinkumware STL
implementation.
Anyway, looks like it would be much easier to reimplement counting
iterator with overflow-able strategy, or implement 'int' wrapper which
plays nice with {{{boost::counting_iterator}} rather than fixing this
"bug" in Boost.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3659#comment:8> 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