View source code
							
							
						
								Display the source code in std/typecons.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Function std.typecons.Tuple.opEquals
Comparison for equality. Two Tuples are considered equal
 iff they fulfill the following criteria:
						
				bool opEquals(R)
				(
				
				  R rhs
				
				)
				
				if (areCompatibleTuples!(typeof(this), R, "=="));
				
				
				bool opEquals(R)
				(
				
				  R rhs
				
				) const
				
				if (areCompatibleTuples!(typeof(this), R, "=="));
				
				
				bool opEquals(R...)
				(
				
				  auto ref R rhs
				
				)
				
				if (R
				- Each Tupleis the same length.
- For each type Ton the left-hand side and each typeUon the right-hand side, values of typeTcan be compared with values of typeU.
- For each value v1on the left-hand side and each valuev2on the right-hand side, the expressionv1 == v2is true.
Parameters
| Name | Description | 
|---|---|
| rhs | The Tupleto compare against. It must meeting the criteria
           for comparison betweenTuples. | 
Returns
true if both Tuples are equal, otherwise false.
Example
Tuple!(int, string) t1 = tuple(1, "test");
Tuple!(double, string) t2 =  tuple(1.0, "test");
//Ok, int can be compared with double and
//both have a value of 1
writeln(t1); // t2
Authors
Andrei Alexandrescu, Bartosz Milewski, Don Clugston, Shin Fujishiro, Kenji Hara
License
					Copyright © 1999-2018 by the D Language Foundation | Page generated by ddox.