Container of objects with unique IDs
Looks pretty good to me. The only glaring stylistic issue I see is that you inherit from std::set instead of having a member of that type. Inheriting from classes whose innards you don't personally control usually leads to issues with slicing and/or expecting-polymorphism-and-not-getting-it. However, since you're doing private inheritance, this is probably okay.

There are a couple of functional improvements you might want to make (but then again might not, because they're subtle).

(1) Your Object type has an operator&lt; that does nothing but compare ids. That's unlikely to be useful in practice. But you need to have that "compare ids" operation so that you can make your sorted set. The solution is to pass a comparator to your set, like so:

class ObjectSet {
    static bool id_less(const Object&amp; a, const Object&amp; b) {
        return a.id() &lt; b.id();
    }
    std::set&lt;Object, decltype(&amp;id_less)&gt; items_;

  public:
    ObjectSet() : items_(id_less) {}

    // ...
};


This allows you to reclaim Object::operator&lt; for some more appropriate semantics.

(2) Continuing with comparators... Every time I call removeObject, you construct a whole Object to pass to erase. This seems wasteful (assuming Object is a heavyweight type), and also counter-intuitive: what do you mean, removeObject calls the constructor of Object?! :)

The solution requires C++14 or better, because it depends on a particular overload of std::set&lt;T&gt;::find() that first showed up in C++14.

class ObjectSet
{
    static bool id_less(const Object&amp; a, const Object&amp; b) { return a.id() &lt; b.id(); }
    static bool id_less(const Object&amp; a, std::uint32_t b) { return a.id() &lt; b; }
    static bool id_less(std::uint32_t a, const Object&amp; b) { return a &lt; b.id(); }

    struct Comparator {
        template&lt;class T, class U&gt;
        bool operator()(const T&amp; a, const U&amp; b) { return id_less(a, b); }
        using is_transparent = void;
    };

    std::set&lt;Object, Comparator&gt; items_;

    // ...

    void removeObject(std::uint32_t id)
    {
        items_.erase(items_.find(id));
    }
};


(Wandbox link.)