http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60584
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|c++ |libstdc++ Resolution|--- |INVALID --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't know what clang does to compile it, but the code is not valid. vector<T>::emplace_back requires that T is MoveInsertable into the vector. Foo fails that requirement because it has a deleted copy constructor and deleted move constructor, because NonCopyable has a user-provided copy constructor defined as deleted. If you want NonCopyable to be movable then you need to do this: class NonCopyable { public: NonCopyable(){} NonCopyable(const NonCopyable &) = delete; NonCopyable(NonCopyable &&) = default; }; With that move constructor the code works.