Changeset b58affe7 for src/AST/Node.hpp
- Timestamp:
- Jun 24, 2019, 11:24:31 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0e464f6, 3253c32
- Parents:
- 4d978d5 (diff), c1ea11b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Node.hpp
r4d978d5 rb58affe7 100 100 101 101 /// Mutate a node field (only clones if not equal to existing value) 102 template<typename node_t, typename field_t, typename assn_t>103 const node_t * mutate_field( const node_t * node, field_t node_t::* field, assn_t && val ) {102 template<typename node_t, typename parent_t, typename field_t, typename assn_t> 103 const node_t * mutate_field( const node_t * node, field_t parent_t::* field, assn_t && val ) { 104 104 // skip mutate if equivalent 105 105 if ( node->*field == val ) return node; … … 112 112 113 113 /// Mutate a single index of a node field (only clones if not equal to existing value) 114 template<typename node_t, typename coll_t, typename ind_t, typename field_t>114 template<typename node_t, typename parent_t, typename coll_t, typename ind_t, typename field_t> 115 115 const node_t * mutate_field_index( 116 const node_t * node, coll_t node_t::* field, ind_t i, field_t && val116 const node_t * node, coll_t parent_t::* field, ind_t i, field_t && val 117 117 ) { 118 118 // skip mutate if equivalent
Note: See TracChangeset
for help on using the changeset viewer.