rbtree::emplace_hint() compilation fix for variadic arg use #392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides a fix for the
rbtree::emplace_hint()
method, when it called using multiply variadic template arguments. The problem is inDoInsertValueHint()
method, which can't accept the forwarded parameter pack, expecting an already constructedpair
only. A small example:This PR makes the interface of the
DoInsertValueHint()
method (internal helper for "hint" versions of insert methods) similar to theDoInsertValue()
method (another helper for non-"hint" insert methods), so it can be used with variadic template arguments now.Additional fixes:
rbtree::try_emplace()
move rvalue-refkey
instead of copy;rbtree::try_emplace()
delegatesvalue_type
construction to the internal logic;hashtable::insert()
can be complied now (was needed for new tests).Map and multimap tests have been extended to cover more use-cases of these methods (changes in
TestMapCpp11()
,TestMultimapCpp11()
functions).There are no changes in the public interface of the mentioned classes.