source: libcfa/src/containers/pair.hfa @ 1b64344

ADTast-experimentalpthread-emulationqualifiedEnum
Last change on this file since 1b64344 was fd54fef, checked in by Michael Brooks <mlbrooks@…>, 4 years ago

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

  • Property mode set to 100644
File size: 1.1 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 : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:59:53 2017
13// Update Count     : 2
14//
15
16#pragma once
17
18forall(R, S) struct pair {
19        R first;
20        S second;
21};
22
23forall(R, S
24        | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
25int ?<?(pair(R, S) p, pair(R, S) q);
26
27forall(R, S
28        | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
29int ?<=?(pair(R, S) p, pair(R, S) q);
30
31forall(R, S | { int ?==?(R, R); int ?==?(S, S); })
32int ?==?(pair(R, S) p, pair(R, S) q);
33
34forall(R, S | { int ?!=?(R, R); int ?!=?(S, S); })
35int ?!=?(pair(R, S) p, pair(R, S) q);
36
37forall(R, S
38        | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
39int ?>?(pair(R, S) p, pair(R, S) q);
40
41forall(R, S
42        | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
43int ?>=?(pair(R, S) p, pair(R, S) q);
44
45// Local Variables: //
46// mode: c //
47// tab-width: 4 //
48// End: //
Note: See TracBrowser for help on using the repository browser.