Changeset f3cc5b6 for src/AST/Init.hpp
- Timestamp:
- May 16, 2019, 2:33:48 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 204358b, 9b4f329
- Parents:
- 24afc53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Init.hpp
r24afc53 rf3cc5b6 23 23 #include "Visitor.hpp" 24 24 25 // Must be included in *all* AST classes; should be #undef'd at the end of the file 26 #define MUTATE_FRIEND template<typename node_t> friend auto mutate(const node_t * node); 27 25 28 namespace ast { 26 29 … … 40 43 private: 41 44 Designation* clone() const override { return new Designation{ *this }; } 45 MUTATE_FRIEND 42 46 }; 43 47 … … 55 59 private: 56 60 const Init * clone() const override = 0; 61 MUTATE_FRIEND 57 62 }; 58 63 … … 69 74 private: 70 75 SingleInit * clone() const override { return new SingleInit{ *this }; } 71 72 /// Must be copied in ALL derived classes 73 template<typename node_t> 74 friend auto mutate(const node_t * node); 76 MUTATE_FRIEND 75 77 }; 76 78 … … 97 99 private: 98 100 ListInit * clone() const override { return new ListInit{ *this }; } 99 100 /// Must be copied in ALL derived classes 101 template<typename node_t> 102 friend auto mutate(const node_t * node); 101 MUTATE_FRIEND 103 102 }; 104 103 … … 120 119 private: 121 120 ConstructorInit * clone() const override { return new ConstructorInit{ *this }; } 122 123 /// Must be copied in ALL derived classes 124 template<typename node_t> 125 friend auto mutate(const node_t * node); 121 MUTATE_FRIEND 126 122 }; 127 123 … … 142 138 } 143 139 140 #undef MUTATE_FRIEND 141 144 142 // Local Variables: // 145 143 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.