90 invariant(symbol.code_len <= Traits::MaxCodeLenghtBits);
96 std::reference_wrapper<std::unique_ptr<Node>> newBud =
root;
97 for (
unsigned bit : symbol.getBitsMSB()) {
101 std::unique_ptr<Node>& bud = newBud;
103 bud = std::make_unique<Branch>();
105 newBud = bud->getAsBranch().buds[bit];
107 invariant(partial == symbol &&
"Failed to interpret symbol as bit sequence.");
109 std::unique_ptr<Node>& bud = newBud;
110 assert(!bud &&
"This Node should be vacant!");
113 bud = std::make_unique<Leaf>(value);