ADTast-experimental
Last change
on this file since 1dafdfc was
1dafdfc,
checked in by Andrew Beach <ajbeach@…>, 2 years ago
|
Moved code from _dtype_static_member_ initializer to an assignment in a comma expression. Fixes bug #266, added a test.
|
-
Property mode set to
100644
|
File size:
287 bytes
|
Rev | Line | |
---|
[1dafdfc] | 1 | forall(T &) |
---|
| 2 | struct A { |
---|
| 3 | T * next; |
---|
| 4 | }; |
---|
| 5 | |
---|
| 6 | struct B { |
---|
| 7 | A(B) link; |
---|
| 8 | }; |
---|
| 9 | |
---|
| 10 | int main(void) { |
---|
| 11 | B end = { { 0p } }; |
---|
| 12 | B two = { { &end } }; |
---|
| 13 | B one = { { &two } }; |
---|
| 14 | B * head = &one; |
---|
| 15 | |
---|
| 16 | for (B ** it = &head ; (*it)->link.next ; it = &(*it)->link.next) { |
---|
| 17 | printf("loop\n"); |
---|
| 18 | } |
---|
| 19 | printf("done\n"); |
---|
| 20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.