[Patch] Small refactor on <regex> _State<>
Tim Shen
timshen@google.com
Wed Jul 29 08:43:00 GMT 2015
On Wed, Jul 29, 2015 at 1:32 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> Apologies, you have a user-declared move constructor, so assignment is
> already deleted. It wouldn't hurt to make that explicit though:
I'm just bad at memorizing when they are implicitly
declared/defined/deleted and fully unware of the deleted copy
assignment :)
It's better to make it explicit, since I don't want to be clever on
pretending knowing all ctor/assigment rules :)
> _State& operator=(const _State&) = delete;
>
> So it's just the alignment issue that I'm concerned about now.
>
Will alignof(std::function<bool(C)>) be all the same across
instantiations, including user-defined C, now and in the future?
I created template parameter _Matcher_size (which should be
__matcher_size) because I don't want to make this assumption on
sizeof(). If they (both alignment and size) are expected to be the
same, we can remove that template parameter (and all indentation
changes!); otherwise, is alignment more unlikely to change than size
the reason we always stick on alignof(std::function<bool(char)>)?
--
Regards,
Tim Shen
More information about the Libstdc++
mailing list