This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add explicit default constructors where required by the standard


Good point, thanks!
Revised patch attached.

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.

Attachment: libstdc++-explicit-default-ctor.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]