Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/containers/maybe.c

    r79308c8e r64fc0ba  
    4040void ^?{}(maybe(T) * this) {
    4141        if (this->has_value) {
    42                 ^(this->value){};
     42                ^(&this->value){};
    4343        }
    4444}
    4545
    4646forall(otype T)
    47 _Bool ?!=?(result(T, E) this, zero_t) {
    48         return !this->has_value;
     47bool ?!=?(maybe(T) this, zero_t) {
     48        return !this.has_value;
    4949}
    5050
    5151forall(otype T)
    5252maybe(T) maybe_value(T value) {
    53         return (Maybe(T)){value};
     53        return (maybe(T)){value};
    5454}
    5555
    5656forall(otype T)
    5757maybe(T) maybe_none() {
    58         return (Maybe(T)){};
     58        return (maybe(T)){};
    5959}
    6060
    6161forall(otype T)
    62 _Bool has_value(maybe(T) * this) {
     62bool has_value(maybe(T) * this) {
    6363        return this->has_value;
    6464}
Note: See TracChangeset for help on using the changeset viewer.