Commits

Dave Abrahams committed 7a91b9f7499
[stdlib] Remove *, /, and % from RandomAccessIndex Before this commit, RandomAccessIndex was a refinement of NumericOperations, which forced it to support inappropriate operations such as multiplication. Many obvious random-access index types can't support multiplication (e.g. a StridedIndex adapter, which moves its underlying index by N positions for each increment). Along the way: * the addition and subtraction operations on RandomAccessIndex were renamed to advancedBy and distanceTo, which prevents nasty ambiguities when a type conforms to both RandomAccessIndex and Integer, and allows Index DistanceTypes to actually be signed integers even when the Index is unsigned. * Before this commit, using internal interfaces, it was possible to request static checking without also getting dynamic checks when static checking is impossible. Now the relationship between static and dynamic checking is built into the core protocols. * NumericOperations.swift was moved into IntegerArithmetic.swift.gyb, correcting missing operators by generating them programmatically and in preparation for renaming the protocol to something more appropriate Fixes <rdar://problem/16246927> RandomAccessIndex is over-constrained and possibly: <rdar://problem/15605729> Make all operators generic over protocols (in particular, get NumericOperations done) Swift SVN r14854