Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/containers/result

    r64fc0ba r79308c8e  
    1818#define RESULT_H
    1919
    20 #include <stdbool.h>
    2120
    2221// DO NOT USE DIRECTLY!
    2322forall(otype T, otype E)
    24 union inner_result{
    25         T value;
    26         E error;
    27 };
    28 
    29 forall(otype T, otype E)
    3023struct result {
    31         bool has_value;
    32         inner_result(T, E);
     24        _Bool has_value;
     25        union {
     26                T value;
     27                E error;
     28        };
    3329};
    3430
     
    5046
    5147forall(otype T, otype E)
    52 bool ?!=?(result(T, E) this, zero_t);
     48_Bool ?!=?(result(T, E) this, zero_t);
    5349
    5450forall(otype T, otype E)
     
    5955
    6056forall(otype T, otype E)
    61 bool has_value(result(T, E) * this);
     57_Bool has_value(result(T, E) * this);
    6258
    6359forall(otype T, otype E)
Note: See TracChangeset for help on using the changeset viewer.