Subject: [boost] [range] index adaptor with size_t as index_type
From: Tobias Loew (Tobias.Loew_at_[hidden])
Date: 2015-08-10 09:19:50
>From version 1.55 to 1.56 the index_type of the index of the range
index-adaptor was changed from size_t to ptr_diff which e.g. allows for
negativ start values. But this has the side-effect that comparison with
other size_t-values (e.g. a call to vector's size()) results in a compiler
warning for comparing signed and unsigned values (on MSVC 11: warning C4018:
'<' : signed/unsigned mismatch).
I'm proposing a specialized version of the index adaptor, where the
index_type is size_t and the start index is 0 (zero) and explicit
specification of the start-value is not possible.
A possible name could be "uindex".
comments / critics / pros / cons are welcome
-- View this message in context: http://boost.2283326.n4.nabble.com/range-index-adaptor-with-size-t-as-index-type-tp4678681.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk