source: libcfa/src/containers/pair.cfa @ 524ed86

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since 524ed86 was 58b6d1b, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Fixed tests after headers change

  • Property mode set to 100644
File size: 1.4 KB
Line 
1// The contents of this file are covered under the licence agreement in the
2// file "LICENCE" distributed with Cforall.
3//
4// pair.c --
5//
6// Author           : Aaron Moss
7// Created On       : Wed Apr 12 15:32:00 2017
8// Last Modified By : Aaron Moss
9// Last Modified On : Wed Apr 12 15:32:00 2017
10// Update Count     : 1
11//
12
13#include <containers/pair.hfa>
14
15forall(otype R, otype S
16        | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
17int ?<?(pair(R, S) p, pair(R, S) q) {
18        return p.first < q.first || ( p.first == q.first && p.second < q.second );
19}
20
21forall(otype R, otype S
22        | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
23int ?<=?(pair(R, S) p, pair(R, S) q) {
24        return p.first < q.first || ( p.first == q.first && p.second <= q.second );
25}
26
27forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
28int ?==?(pair(R, S) p, pair(R, S) q) {
29        return p.first == q.first && p.second == q.second;
30}
31
32forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
33int ?!=?(pair(R, S) p, pair(R, S) q) {
34        return p.first != q.first || p.second != q.second;
35}
36
37forall(otype R, otype S
38        | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
39int ?>?(pair(R, S) p, pair(R, S) q) {
40        return p.first > q.first || ( p.first == q.first && p.second > q.second );
41}
42
43forall(otype R, otype S
44        | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
45int ?>=?(pair(R, S) p, pair(R, S) q) {
46        return p.first > q.first || ( p.first == q.first && p.second >= q.second );
47}
Note: See TracBrowser for help on using the repository browser.