Commit Graph

18 Commits

Author SHA1 Message Date
Max Moiseev
4027afa536 [stdlib] fixing the signature of RandomAccessCollection.index(_:offsetBy:limitedBy:) and uncommenting the test 2016-05-11 17:27:49 -07:00
Roman Levenstein
4544cd196e Fix an off-by-one error in the condition of the index method. 2016-05-03 17:07:06 -07:00
Dave Abrahams
0d68b3a4af [stdlib] Generate RandomAccessCollection defaults
The defaults we were generating for Collection and
BidirectionalCollection didn't make any sense, because if you could do
that strideable arithmetic then you essentially had random access.
Instead we constrain the defaults to apply to RandomAccessCollection
where the Indices are a CountableRange.
2016-05-02 11:35:32 -07:00
Dave Abrahams
9bee5d182f [stdlib] location/formLocation => index/formIndex 2016-04-26 17:46:16 -07:00
Dave Abrahams
47a870cc50 [stdlib] Use location/formLocation for all index movement 2016-04-21 17:13:41 -07:00
Max Moiseev
37bf02f7da [stdlib][swift-3-indexing-model] changes in index(_:stepsFrom:limitedBy:)
- index(_:stepsFrom:limitedBy:) returns Index?
- formIndex(_:stepsFrom:limitedBy) returns Bool
2016-04-14 11:49:27 -07:00
Dave Abrahams
94771b4a39 [stdlib] Update indexing model doc comments
Also fix some diagnostics
2016-04-06 17:34:00 -07:00
Dave Abrahams
4d651f8fc0 limit: => limitedBy:, pt 1
M-x findr-query-replace

\(,[
]*\)limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\)) ->

\1limitedBy limit: \2) ->
2016-03-28 13:03:59 -07:00
Max Moiseev
d721a03d90 [stdlib][swift-3-indexing-model] fixing Index tests 2016-03-23 16:07:20 -07:00
Dmitri Gribenko
d9a2b45449 New indexing model: tighten requirements on *Collection.Indices 2016-03-22 16:37:21 -07:00
Dmitri Gribenko
55885fb5ed New indexing model: tighten requirements on SubSequence types 2016-03-22 15:02:45 -07:00
Dmitri Gribenko
ea51ace6b8 New indexing model: generate three DefaultIndices types
We need three index types, one for each traversal kind.
2016-03-18 23:03:18 -07:00
Dave Abrahams
a5b0b9d764 [stdlib] indexing model: lift Strideable constraint
Making constraining the indices of RandomAccessCollections to be
Strideable has dubious semantic implications and makes implementing
AnyRandomAccessCollection really hard.
2016-03-15 12:54:41 -07:00
Dmitri Gribenko
edc18682f2 New indexing model: default implementation for Collection._failEarlyRangeCheck() 2016-03-11 01:36:48 -08:00
Shawn Erickson
68ff64357c Changed _failEarlyRangeCheck(rangeStart: ... boundsEnd:) --> _failEarlyRangeCheck(range:, bounds:) 2016-03-07 09:57:48 -08:00
Dmitri Gribenko
ad1428e1d6 New collection indexing model: removed old index protocols
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00
Shawn Erickson
f11a3227c8 [stdlib] - addressing review comments in PR1413 2016-02-23 15:46:29 -08:00
Shawn Erickson
5b4ad21ee6 [stdlib] - overlaying new index model on existing Collection
This adds a basic aspect of the new indexing model on top of the
existing Collection code in a passive way. Things should continue to
function as before.
2016-02-23 15:25:47 -08:00