Changes in src/ResolvExpr/Alternative.h [4a161be:f6f0cca3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.h
r4a161be rf6f0cca3 24 24 class Expression; 25 25 26 class GC; 27 26 28 namespace ResolvExpr { 27 29 struct Alternative { … … 30 32 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost ); 31 33 Alternative( const Alternative &other ); 32 Alternative &operator=( const Alternative &other ); 33 Alternative( Alternative && other ); 34 Alternative &operator=( Alternative && other ); 35 ~Alternative(); 34 Alternative & operator= ( const Alternative &other ); 35 Alternative( Alternative&& other ) = default; 36 Alternative & operator= ( Alternative&& other ) = default; 36 37 37 38 void print( std::ostream &os, Indenter indent = {} ) const; 38 39 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 40 Cost cost; 47 41 Cost cvtCost; 48 Expression * expr;42 Expression * expr; 49 43 TypeEnvironment env; 50 44 }; … … 62 56 return os; 63 57 } 58 59 const GC& operator<< ( const GC&, const Alternative& ); 64 60 } // namespace ResolvExpr 65 61
Note: See TracChangeset
for help on using the changeset viewer.