https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109801
--- Comment #4 from Scott Zhong <szhong at perforce dot com> --- The move constructor "steals" resources rather than make copies of them, and leave the argument in some valid but otherwise indeterminate state. It is reasonable that size_ is not initialized in the context of a move constructor. If you define body to the constructor and destructor for the class list, the warning goes away, which has nothing to do with size_ being initialized or not. template <typename T> class list { public: list() {} ~list() {} };