LeetCode 535: Encode and Decode TinyURL
You are doing the lookup twice.
            if (!encoded_url.count(long_url)) {

                .. stuff

            } else {
                tiny_encoded = encoded_url[long_url];
            }

I know that it is O(1) for the lookup. But there is a real constant inside that. Avoid it if you can.
Use find(). Then if it is there you can simply use it.
            auto find = encoded_url.find(long_url);
            if (find == encoded_url.end()) {

                .. stuff

            } else {
                tiny_encoded = find-&gt;second;
            }


This is great if you want random URL that are hard to guess.
                for (auto index = 0; index &lt; kTinySize; ++index) {
                    tiny_encoded.push_back(char_pool[rand_generator() % std::size(char_pool)]);
                }

But is that a requirement of the puzzle. Seems (not sure how expensive the generating the random number is) like this is very expensive way of generating a name.
There is also a chance for a clash. If you are using randomly generated values append a timestamp on the end to avoid a clash.

Personally I don't like having to specify a type. But if you are goint to do it use the type of the method rather than being this specific:
    encoded_url.insert(std::pair&lt;std::string, std::string&gt;(long_url, tiny_encoded));


    // Top of the class.
    using Map      = std::unordered_map&lt;std::string, std::string&gt;;
    using MapValue = Map::value_type;

    // In the code.
    encoded_url.insert(MapValue(long_url, tiny_encoded));

But I think I would simply have used emplace().
    encoded_url.emplace(long_url, tiny_encoded);