@@ -23,6 +23,82 @@ comparableOperators = [
23
23
24
24
}%
25
25
26
+ /// Returns a Boolean value indicating whether the corresponding components of
27
+ /// two tuples are equal.
28
+ ///
29
+ /// All arity zero tuples are equal.
30
+ ///
31
+ /// - Parameters:
32
+ /// - lhs: An empty tuple.
33
+ /// - rhs: An empty tuple.
34
+ public func ==(lhs: (), rhs: ()) -> Bool {
35
+ return true
36
+ }
37
+
38
+ /// Returns a Boolean value indicating whether any corresponding components of
39
+ /// the two tuples are not equal.
40
+ ///
41
+ /// All arity zero tuples are equal.
42
+ ///
43
+ /// - Parameters:
44
+ /// - lhs: An empty tuple.
45
+ /// - rhs: An empty tuple.
46
+ public func !=(lhs: (), rhs: ()) -> Bool {
47
+ return false
48
+ }
49
+
50
+ /// Returns a Boolean value indicating whether the first tuple is ordered
51
+ /// before the second in a lexicographical ordering.
52
+ ///
53
+ /// An arity zero tuple is never strictly before another arity zero tuple in a
54
+ /// lexicographical ordering.
55
+ ///
56
+ /// - Parameters:
57
+ /// - lhs: An empty tuple.
58
+ /// - rhs: An empty tuple.
59
+ public func <(lhs: (), rhs: ()) -> Bool {
60
+ return false
61
+ }
62
+
63
+ /// Returns a Boolean value indicating whether the first tuple is ordered
64
+ /// before or the same as the second in a lexicographical ordering.
65
+ ///
66
+ /// An arity zero tuple is always before or the same as another arity zero tuple
67
+ /// in a lexicographical ordering.
68
+ ///
69
+ /// - Parameters:
70
+ /// - lhs: An empty tuple.
71
+ /// - rhs: An empty tuple.
72
+ public func <=(lhs: (), rhs: ()) -> Bool {
73
+ return true
74
+ }
75
+
76
+ /// Returns a Boolean value indicating whether the first tuple is ordered
77
+ /// after the second in a lexicographical ordering.
78
+ ///
79
+ /// An arity zero tuple is never strictly after another arity zero tuple in a
80
+ /// lexicographical ordering.
81
+ ///
82
+ /// - Parameters:
83
+ /// - lhs: An empty tuple.
84
+ /// - rhs: An empty tuple.
85
+ public func >(lhs: (), rhs: ()) -> Bool {
86
+ return false
87
+ }
88
+
89
+ /// Returns a Boolean value indicating whether the first tuple is ordered
90
+ /// after or the same as the second in a lexicographical ordering.
91
+ ///
92
+ /// An arity zero tuple is always after or the same as another arity zero tuple
93
+ /// in a lexicographical ordering.
94
+ ///
95
+ /// - Parameters:
96
+ /// - lhs: An empty tuple.
97
+ /// - rhs: An empty tuple.
98
+ public func >=(lhs: (), rhs: ()) -> Bool {
99
+ return true
100
+ }
101
+
26
102
% for arity in range(2,7):
27
103
% typeParams = [chr(ord("A") + i) for i in range(arity)]
28
104
% tupleT = "({})".format(",".join(typeParams))
0 commit comments