Changeset d1ee9ec


Ignore:
Timestamp:
Jul 23, 2020, 2:43:33 PM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c408483
Parents:
923d25a
Message:

Added some notes about the copy functions to the porting document.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/porting.md

    r923d25a rd1ee9ec  
    4747      template<typename node_t>
    4848      friend node_t * mutate(const node_t * node);
     49      template<typename node_t>
     50      friend node_t * shallowCopy(const node_t * node);
     51    or equilant.
     52* You should use the `mutate` function where possible as it avoids extra copies.
     53  * If you must copy use `shallowCopy` or `deepCopy` as required.
    4954
    5055All leaves of the `Node` inheritance tree are now declared `final`
Note: See TracChangeset for help on using the changeset viewer.