Simplify _Rb_tree instantiation

François Dumont frs.dumont@gmail.com
Sun May 27 17:10:00 GMT 2018


On 25/05/2018 21:19, Ville Voutilainen wrote:
> On 25 May 2018 at 22:16, Jonathan Wakely <jwakely@redhat.com> wrote:
>>> Why is this patch removing _Compare() calls? That changes the
>>> initialization
>>> of _Compare from value-initialization to default-initialization, which
>>> is a breaking change.
>>
>> The _Rb_tree_key_compare base class will still value-initialize it:
>>
>>       _Rb_tree_key_compare()
>>       _GLIBCXX_NOEXCEPT_IF(
>>          is_nothrow_default_constructible<_Key_compare>::value)
>>       : _M_key_compare()
>>       { }
> Okay, no problem then.
>
Now applied, note that I eventually restored the explicit calls to 
_M_t() in the template iterator range constructors. We didn't talk about 
it and there is also such a call for the default constructors in 
pre-c++11 mode so I prefered to keep consistency.

François



More information about the Libstdc++ mailing list