This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Small refactor on <regex> _State<>
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Tim Shen <timshen at google dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Jul 2015 09:32:14 +0100
- Subject: Re: [Patch] Small refactor on <regex> _State<>
- Authentication-results: sourceware.org; auth=none
- References: <CAG4ZjNnYLoCYnjNpkJYHa2Q-ux0KnKmVXBDUOa33xk29MzeTKA at mail dot gmail dot com> <20150725153121 dot GW21787 at redhat dot com> <CAG4ZjNnvm=QAwihOUvMLtOezYprtasaJOY3i-MhJV0Tf4z5mpg at mail dot gmail dot com> <20150728151925 dot GO10878 at redhat dot com>
On 28/07/15 16:19 +0100, Jonathan Wakely wrote:
What I'm concerned about is assignment. You haven't defined an
assignment operator. If there's an unwanted assignment we could get
undefined behaviour. Please delete the assignment operator if it's not
needed.
Apologies, you have a user-declared move constructor, so assignment is
already deleted. It wouldn't hurt to make that explicit though:
_State& operator=(const _State&) = delete;
So it's just the alignment issue that I'm concerned about now.