Changes in src/libcfa/containers/result [64fc0ba:79308c8e]
- File:
-
- 1 edited
-
src/libcfa/containers/result (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/containers/result
r64fc0ba r79308c8e 18 18 #define RESULT_H 19 19 20 #include <stdbool.h>21 20 22 21 // DO NOT USE DIRECTLY! 23 22 forall(otype T, otype E) 24 union inner_result{25 T value;26 E error;27 };28 29 forall(otype T, otype E)30 23 struct result { 31 bool has_value; 32 inner_result(T, E); 24 _Bool has_value; 25 union { 26 T value; 27 E error; 28 }; 33 29 }; 34 30 … … 50 46 51 47 forall(otype T, otype E) 52 bool ?!=?(result(T, E) this, zero_t);48 _Bool ?!=?(result(T, E) this, zero_t); 53 49 54 50 forall(otype T, otype E) … … 59 55 60 56 forall(otype T, otype E) 61 bool has_value(result(T, E) * this);57 _Bool has_value(result(T, E) * this); 62 58 63 59 forall(otype T, otype E)
Note:
See TracChangeset
for help on using the changeset viewer.