Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.h

    r4a161be rf229fc2  
    2424class Expression;
    2525
     26class GC;
     27
    2628namespace ResolvExpr {
    2729        struct Alternative {
     
    2931                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost );
    3032                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;
    3635
    3736                void print( std::ostream &os, Indenter indent = {} ) const;
    3837
    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 
    4638                Cost cost;
    4739                Cost cvtCost;
    48                 Expression *expr;
     40                Expression * expr;
    4941                TypeEnvironment env;
    5042        };
     
    6254                return os;
    6355        }
     56
     57        const GC& operator<< ( const GC&, const Alternative& );
    6458} // namespace ResolvExpr
    6559
Note: See TracChangeset for help on using the changeset viewer.