Inserting multiple elements at known locations in a vector
We need to include &lt;algorithm&gt; for std::sort and &lt;cassert&gt; for assert.

void print(std::vector&lt;T&gt; &amp;x): Since we don't modify the vector, this should take a const&amp; (and use a const&amp; internally in the range-based for loop).

void reorder(std::vector&lt;T&gt; &amp;v, std::vector&lt;uint32_t&gt; &amp;order): Again, order can be a const&amp;.

We should use std::size_t for indices into a vector, not uint32_t or size_t.

If we need a signed type for dealing with index differences, we should use std::ptrdiff_t, not int. It might be easier to count forwards, and then calculate the indices we need inside the loop though.

There's no point in std::moveing a char.



Rather than inserting elements in-place, we can create a new vector and copy the elements over, selecting from the appropriate source at each index. This doesn't require any more memory than calling x.resize().
e.g.:
{
    std::vector&lt;char&gt; x = {'H', 'e', 'l', 'l', 'W', 'o', 'l', 'd'};
    std::vector&lt;char&gt; values = {'r', 'o'};
    std::vector&lt;size_t&gt; positions = {6, 4};

    auto indices = sort_indices(positions);
    reorder(positions, indices);
    reorder(values, indices);

    auto size = x.size() + values.size();

    auto y = std::vector&lt;char&gt;();
    y.reserve(size);

    auto v = std::size_t{ 0 }; // index into x
    auto p = std::size_t{ 0 }; // index into positions / values

    for (auto i = std::size_t{ 0 }; i != size; ) // index into y
    {
        if (v == positions[p])
        {
            y.push_back(values[p]);
            ++p;
            ++i;
        }
        else
        {
            y.push_back(x[v]);
            ++v;
            ++i;
        }
    }

    print(y);
}

Since we expect the x vector to be much larger than the values to be inserted, we could copy larger ranges from x in the else branch above, something like:
            auto beg = v;
            auto end = (p == positions.size() ? x.size() : positions[p]);

            y.insert(y.end(), x.begin() + beg, x.begin() + end);
            v = end;
            i += (beg - end);

(Warning: code not properly tested).