- File:
-
- 1 edited
-
tests/exceptions/polymorphic.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/polymorphic.cfa
rd00d581 recfd758 1 1 // Testing polymophic exception types. 2 2 3 forall(T &) exception proxy {}; 3 #include <exception.hfa> 4 4 5 vtable(proxy(int)) proxy_int; 6 vtable(proxy(char)) proxy_char; 5 EHM_FORALL_EXCEPTION(proxy, (T&), (T))(); 6 7 EHM_FORALL_VIRTUAL_TABLE(proxy, (int), proxy_int); 8 EHM_FORALL_VIRTUAL_TABLE(proxy, (char), proxy_char); 7 9 8 10 void proxy_test(void) { … … 31 33 } 32 34 33 forall(T) exception cell { 35 EHM_FORALL_EXCEPTION(cell, (T), (T))( 34 36 T data; 35 };37 ); 36 38 37 vtable(cell(int)) int_cell;38 vtable(cell(char)) char_cell;39 vtable(cell(bool)) bool_cell;39 EHM_FORALL_VIRTUAL_TABLE(cell, (int), int_cell); 40 EHM_FORALL_VIRTUAL_TABLE(cell, (char), char_cell); 41 EHM_FORALL_VIRTUAL_TABLE(cell, (bool), bool_cell); 40 42 41 43 void cell_test(void) {
Note:
See TracChangeset
for help on using the changeset viewer.