Changes in src/ResolvExpr/Alternative.h [4a161be:f229fc2]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.h
r4a161be rf229fc2 24 24 class Expression; 25 25 26 class GC; 27 26 28 namespace ResolvExpr { 27 29 struct Alternative { … … 29 31 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost ); 30 32 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost ); 31 Alternative( const Alternative &other ); 32 Alternative &operator=( const Alternative &other ); 33 Alternative( Alternative && other ); 34 Alternative &operator=( Alternative && other ); 35 ~Alternative(); 33 Alternative( const Alternative &other ) = default; 34 Alternative &operator=( const Alternative &other ) = default; 36 35 37 36 void print( std::ostream &os, Indenter indent = {} ) const; 38 37 39 /// Returns the stored expression, but released from management of this Alternative40 Expression* release_expr() {41 Expression* tmp = expr;42 expr = nullptr;43 return tmp;44 }45 46 38 Cost cost; 47 39 Cost cvtCost; 48 Expression * expr;40 Expression * expr; 49 41 TypeEnvironment env; 50 42 }; … … 62 54 return os; 63 55 } 56 57 const GC& operator<< ( const GC&, const Alternative& ); 64 58 } // namespace ResolvExpr 65 59
Note:
See TracChangeset
for help on using the changeset viewer.