https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109801

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Scott Zhong from comment #4)
> 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() {}
> };

Because if you don't have the define then the calls might clobber some other
memory ...

Reply via email to