As you say, m_Foos is actually a data member of another class (I will call it FooHolder ). If you have not provided a copy constructor for FooHolder , the compiler will automatically generate it. This copy constructor will invoke the copy constructors of all FooHolder data FooHolder , including m_Foos . Of course, the copy constructor std::vector<Foo> contains a compilation error, since Foo not copied. This is probably why you get the error.
You will need to provide an appropriate copy constructor for FooHolder if you can and want this class to be copied. Otherwise, you can simply declare the move constructor (possibly the default), which will remove the copy constructor:
struct FooHolder { FooHolder(FooHolder&&) = default; private: std::vector<Foo> m_Foos; };
Angew source share