source: src/libcfa/containers/pair@ ad1a8dd

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since ad1a8dd was eaa5043, checked in by Aaron Moss <a3moss@…>, 8 years ago

Added containers/pair to stdlib (doesn't build yet for some reason)

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