Changes in / [667c7da:0e44184]


Ignore:
Location:
src
Files:
4 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/containers/maybe

    r667c7da r0e44184  
    1010// Created On       : Wed May 24 14:43:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:42:00 2017
    13 // Update Count     : 2
     12// Last Modified On : Thr May 25 16:36:00 2017
     13// Update Count     : 1
    1414//
    1515
     
    4646bool ?!=?(maybe(T) this, zero_t);
    4747
    48 /* Waiting for bug#11 to be fixed.
    4948forall(otype T)
    5049maybe(T) maybe_value(T value);
     
    5251forall(otype T)
    5352maybe(T) maybe_none();
    54 */
    5553
    5654forall(otype T)
  • src/libcfa/containers/result

    r667c7da r0e44184  
    1010// Created On       : Wed May 24 14:45:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:41:00 2017
    13 // Update Count     : 2
     12// Last Modified On : Thr May 25 16:39:00 2017
     13// Update Count     : 1
    1414//
    1515
     
    5555bool ?!=?(result(T, E) this, zero_t);
    5656
    57 /* Wating for bug#11 to be fixed.
    5857forall(otype T, otype E)
    5958result(T, E) result_value(T value);
     
    6160forall(otype T, otype E)
    6261result(T, E) result_error(E error);
    63 */
    6462
    6563forall(otype T, otype E)
  • src/libcfa/containers/result.c

    r667c7da r0e44184  
    7474forall(otype T, otype E)
    7575bool ?!=?(result(T, E) this, zero_t) {
    76         return this.has_value;
     76        return !this.has_value;
    7777}
    7878
     
    100100forall(otype T, otype E)
    101101E get_error(result(T, E) * this) {
    102         assertf(!this->has_value, "attempt to get from result without error");
     102        assertf(this->has_value, "attempt to get from result without error");
    103103        return this->error;
    104104}
Note: See TracChangeset for help on using the changeset viewer.