This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add explicit default constructors where required by the standard
- From: Evgeniy Stepanov <eugenis at google dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 22 Apr 2013 15:13:57 +0400
- Subject: Re: [PATCH] Add explicit default constructors where required by the standard
- References: <CAFKCwrgRP2K0eqPmbWTyBvOqieCW9ayT1CPh3yXNm9rVnNUw9Q at mail dot gmail dot com> <CAH6eHdTSg8ipaq6pCwvSVwfee1LAmVAAH=k2+UvFefFhXXQmCA at mail dot gmail dot com> <CAFKCwriWci5cb8=BVDpcqKQktcWOoitR0aqUV_uLicrYg+BrLw at mail dot gmail dot com> <CAH6eHdQL3knmVgGF5eUHy5d3j0eJ6dYAQ41KOb-Mz7o5UEjSNg at mail dot gmail dot com>
Thanks a lot.
Forgot to mention it earlier, can this be backported in the 4_8 branch as well?
On Sun, Apr 21, 2013 at 12:40 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 19 April 2013 16:19, Evgeniy Stepanov wrote:
>> Good point, thanks!
>> Revised patch attached.
>
> I've committed that version, thanks very much.
>
>
>> On Fri, Apr 19, 2013 at 7:00 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>> On 19 April 2013 15:42, Evgeniy Stepanov wrote:
>>>> Hi,
>>>>
>>>> according to n3242 8.5.6,
>>>>
>>>> If a program calls for the default initialization of an object of a
>>>> const-qualiïed type T, T shall be a class type with a user-provided
>>>> default constructor.
>>>>
>>>> This patches fixes 3 places in libstdc++ code where this requirement
>>>> is violated.
>>>
>>> The violation is how the objects are initialized, not how the class is defined.
>>>
>>> I would prefer to just add {} to the initializers not add the constructors.