Changeset 20877d2 for src/libcfa/containers/result.c
- Timestamp:
- Jun 16, 2017, 3:49:27 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 0892b1b
- Parents:
- d33bc7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/containers/result.c
rd33bc7c r20877d2 74 74 forall(otype T, otype E) 75 75 bool ?!=?(result(T, E) this, zero_t) { 76 return !this.has_value;76 return this.has_value; 77 77 } 78 78 … … 100 100 forall(otype T, otype E) 101 101 E 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"); 103 103 return this->error; 104 104 }
Note: See TracChangeset
for help on using the changeset viewer.