Make the "<<" operator call the right function in the ParseTree class.
This commit is contained in:
parent
b21c2ae643
commit
32a9c2b0d1
|
@ -22,7 +22,7 @@ public:
|
|||
auto& getComponents() const { return subComponents; }
|
||||
void add(const ParseComponent& component) { addComp(component); };
|
||||
void addAll(const vector<ParseComponent>& components) { addAllComps(components); }
|
||||
void operator<<(const ParseComponent& component) { addComp(component); }
|
||||
void operator<<(const ParseComponent& component) { add(component); }
|
||||
explicit ParseTree(const ParseComponent& element): subComponents() { addComp(element); }
|
||||
ParseTree(const initializer_list<ParseComponent>& elements): subComponents() { addAllComps(elements); }
|
||||
ParseTree(): subComponents() {};
|
||||
|
|
Loading…
Reference in New Issue