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