unordered containers emplace
François Dumont
frs.dumont@gmail.com
Wed Dec 7 20:37:00 GMT 2011
On 12/07/2011 01:01 PM, Paolo Carlini wrote:
> Hi,
>> Hi
>>
>> This is the implementation of emplace and emplace_hint for
>> unordered containers. For the moment in emplace_hint the hint
>> iterator is not considered like in the current insert with hint
>> implementation.
> detail: for consistency with _M_insert, I think we should swap the
> arguments of _M_emplace, last true_type / false_type.
This is what I did to begin but it failed to compile, g++ do not
know then when to stop considering arguments as part of the _Args.... I
consider it was a normal limitation of using variadic templates, if so I
can invert parameters of _M_insert to have consistency.
>
> Much more importantly, I don't think we are doing the right thing for
> map / multimap; honestly I cannot say to have followed in any special
> detail the standardization of the piecewise_construct_t things, at the
> corresponding ISO Meetings, but I think we have to involve that pair
> constructor in this case. I'm adding Jon and Chris in CC for you to
> have more help on this, please also have a look to various papers
> authored by Pablo Halpern et al over the last 2/3 years.
Good point, I hadn't notice this potential issue. I am lucky that
the library is well designed making my patch not so bad. I will add the
necessary tests and resubmit a patch.
François
More information about the Libstdc++
mailing list