diff options
Evaluation order in this case is unspecified
On Visual C++ 2010, the `++current` was being evaluated before `[*current]`, causing a deref of `end` and a crash.
Diffstat (limited to 'src')
-rw-r--r-- | src/trie.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -77,7 +77,8 @@ class Trie { typename key_list::const_iterator end ) { if ( current != end ) { - return this->children_[*current].add(++current, end); + auto element = *current; + return this->children_[element].add(++current, end); } else { return this; } |