Commit Graph

6 Commits

Author SHA1 Message Date
Dave Abrahams
e2d9f6f6a5 [stdlib] Fix clamp parameter name
Thanks, Jordan!

Swift SVN r20053
2014-07-16 22:33:01 +00:00
Dave Abrahams
3d61398376 [stdlib] Add clamp method to Interval
Swift SVN r20051
2014-07-16 22:16:26 +00:00
Enrico Granata
b730ab0da7 Add a Mirror for Interval types
Swift SVN r19983
2014-07-15 20:31:30 +00:00
Dave Abrahams
fa991ca164 [stdlib] deep debugDescription for Interval/Range
debugDescription on a type that represents its subparts should use
toDebugString() for their representations.

Swift SVN r19937
2014-07-14 17:53:25 +00:00
Dave Abrahams
9ecbdc2135 [stdlib] punctuation fix in comment
Swift SVN r19905
2014-07-13 21:21:30 +00:00
Dave Abrahams
cb050eee52 [stdlib] Add Interval support
This allows 0.0..<10.3 and 0.1...4.4 to work properly in pattern
matching.

Fixes <rdar://problem/12016900> (#Seed 4: add a "contains" method to the
range types) by making "contains" available on Interval

Addresses <rdar://problem/16254937> (#Seed 4: Ranges with negative
strides are broken) by making the formation of an invalid Interval a
runtime error.

Fixes <rdar://problem/16304317> (Range<T> has limited awesomeness: it is
restricted to types that conform to ForwardIndex)

Fixes <rdar://problem/16736924> (#Seed 4: Enable range inclusion pattern
matching for all types that conform to Equatable and Comparable)

Addresses <rdar://problem/16846325> (#Seed 4: Introduce index range) by
distinguishing Range (which operates on indices) from Interval

Fixes <rdar://problem/17051263> (Pattern-matching a Double range with an
infinite endpoint triggers an assertion failure)

Fixes <rdar://problem/17051271> (#Seed 4: Pattern-matching Double ranges
excludes fractional values)

Addresses <rdar://problem/17171420> (Separate types for closed and
half-open ranges)

Swift SVN r19900
2014-07-13 18:49:36 +00:00