ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 42cd451e was
bf71cfd,
checked in by Thierry Delisle <tdelisle@…>, 6 years ago
|
Moved up many directories in source
|
-
Property mode set to
100644
|
File size:
323 bytes
|
Line | |
---|
1 | forall(otype T) |
---|
2 | struct wrapper |
---|
3 | { |
---|
4 | T value; |
---|
5 | }; |
---|
6 | |
---|
7 | forall(otype T) |
---|
8 | wrapper(T) create() |
---|
9 | { |
---|
10 | wrapper(T) test; |
---|
11 | return test; |
---|
12 | } |
---|
13 | |
---|
14 | forall(otype T) |
---|
15 | wrapper(T)* ?=?(wrapper(T)* lhs, wrapper(T)* rhs) |
---|
16 | { |
---|
17 | lhs->value = rhs->value; |
---|
18 | return lhs; |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | int main(int argc, char const *argv[]) |
---|
23 | { |
---|
24 | wrapper(int) test; |
---|
25 | test = create(); |
---|
26 | return 0; |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.