Ignore:
File:
1 edited

Legend:

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

    r64fc0ba r79308c8e  
    4040void ^?{}(maybe(T) * this) {
    4141        if (this->has_value) {
    42                 ^(&this->value){};
     42                ^(this->value){};
    4343        }
    4444}
    4545
    4646forall(otype T)
    47 bool ?!=?(maybe(T) this, zero_t) {
    48         return !this.has_value;
     47_Bool ?!=?(result(T, E) 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) {
     62_Bool has_value(maybe(T) * this) {
    6363        return this->has_value;
    6464}
Note: See TracChangeset for help on using the changeset viewer.