@@ -644,15 +644,7 @@ internal protocol _AnyIndexBox : class {
644
644
645
645
func _isEqual( to rhs: _AnyIndexBox ) -> Bool
646
646
647
- func _isNotEqual( to rhs: _AnyIndexBox ) -> Bool
648
-
649
647
func _isLess( than rhs: _AnyIndexBox ) -> Bool
650
-
651
- func _isLessOrEqual( to rhs: _AnyIndexBox ) -> Bool
652
-
653
- func _isGreater( than rhs: _AnyIndexBox ) -> Bool
654
-
655
- func _isGreaterOrEqual( to rhs: _AnyIndexBox ) -> Bool
656
648
}
657
649
658
650
internal final class _IndexBox <
@@ -680,25 +672,9 @@ internal final class _IndexBox<
680
672
return _base == _unsafeUnbox ( rhs)
681
673
}
682
674
683
- internal func _isNotEqual( to rhs: _AnyIndexBox ) -> Bool {
684
- return _base != _unsafeUnbox ( rhs)
685
- }
686
-
687
675
internal func _isLess( than rhs: _AnyIndexBox ) -> Bool {
688
676
return _base < _unsafeUnbox ( rhs)
689
677
}
690
-
691
- internal func _isLessOrEqual( to rhs: _AnyIndexBox ) -> Bool {
692
- return _base <= _unsafeUnbox ( rhs)
693
- }
694
-
695
- internal func _isGreater( than rhs: _AnyIndexBox ) -> Bool {
696
- return _base > _unsafeUnbox ( rhs)
697
- }
698
-
699
- internal func _isGreaterOrEqual( to rhs: _AnyIndexBox ) -> Bool {
700
- return _base >= _unsafeUnbox ( rhs)
701
- }
702
678
}
703
679
704
680
/// A wrapper over an underlying index that hides
@@ -731,31 +707,11 @@ public func == (lhs: AnyIndex, rhs: AnyIndex) -> Bool {
731
707
return lhs. _box. _isEqual ( to: rhs. _box)
732
708
}
733
709
734
- public func != ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
735
- _precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
736
- return lhs. _box. _isNotEqual ( to: rhs. _box)
737
- }
738
-
739
710
public func < ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
740
711
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
741
712
return lhs. _box. _isLess ( than: rhs. _box)
742
713
}
743
714
744
- public func <= ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
745
- _precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
746
- return lhs. _box. _isLessOrEqual ( to: rhs. _box)
747
- }
748
-
749
- public func > ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
750
- _precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
751
- return lhs. _box. _isGreater ( than: rhs. _box)
752
- }
753
-
754
- public func >= ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
755
- _precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
756
- return lhs. _box. _isGreaterOrEqual ( to: rhs. _box)
757
- }
758
-
759
715
//===--- Collections ------------------------------------------------------===//
760
716
//===----------------------------------------------------------------------===//
761
717
0 commit comments