My apologies. I updated the post! Now it works just fine!
There's still an issue if you insert something you've searched for first, e.g.:
trie<char16_t> trie;
trie.insert(u"a");
trie.search(u"ab");
trie.insert(u"ab");https://github.com/xorz57/xorz57.netlify.com/commit/48d1c580...
My bad! I fixed it!
#include "trie.hpp" #include <iostream>
int main() { trie<char16_t> trie;