Since samePosition(in:) now unconditionally returns optionals,
String.UTF16View.Index.distance(to: String.UTF16View.Index) must accept an
optional to keep some code working.
Fixes <rdar://33307780>.
I failed to merge the upstream changes to swift-corelibs-foundation at the same
time as I merged that #9806, and it broke on linux. Going to get it right this
time.
- Add Strict/Defaulted Index types to StdlibUnittest
- Test whether a random access index calls its more efficient
customization by tracking successor calls.
- Fix the RandomAccessIndex.advancedBy(n, limit:) API by de-underscoring
the limit parameter
- Inline some internal transparent default implementations to their only
call site
- Attach _RandomAccessAmbiguity type to RandomAccessIndex
rdar://problem/22085119
Swift SVN r30979
- Remove free Swift functions for advance and distance and replace
them with protocol extension methods:
- advancedBy(n)
- advancedBy(n, limit:)
- distanceTo(end)
- Modernize the Index tests
- Use StdlibUnittest
- Test for custom implementation dispatch
Perf impact: No significant changes reported in the
Swift Performance Measurement Tool.
rdar://problem/22085119
Swift SVN r30958
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.
See stdlib/{public,internal,private}/README.txt for more information.
Swift SVN r25876