@@ -137,7 +137,7 @@ class Trie {
137137 // / Find all keys that begin with the given symbol. Fn must take a single
138138 // / argument of type ValueType.
139139 template <typename Fn>
140- void findAll (Symbol symbol, Fn fn) {
140+ void findAll (Symbol symbol, Fn fn) const {
141141 auto found = Root.Entries .find (symbol);
142142 if (found == Root.Entries .end ())
143143 return ;
@@ -157,7 +157,7 @@ class Trie {
157157 // / [begin,end) matches a prefix of the key. Fn must take a single
158158 // / argument of type ValueType.
159159 template <typename Iter, typename Fn>
160- void findAll (Iter begin, Iter end, Fn fn) {
160+ void findAll (Iter begin, Iter end, Fn fn) const {
161161 assert (begin != end);
162162 auto *node = &Root;
163163
@@ -189,7 +189,7 @@ class Trie {
189189 // / Depth-first traversal of all children of the given node, including
190190 // / the node itself. Fn must take a single argument of type ValueType.
191191 template <typename Fn>
192- void visitChildren (Node *node, Fn fn) {
192+ void visitChildren (const Node *node, Fn fn) const {
193193 for (const auto &pair : node->Entries ) {
194194 const auto &entry = pair.second ;
195195 if (entry.Value )
0 commit comments