Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object::stable_insert #765

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gummif
Copy link
Contributor

@gummif gummif commented Oct 11, 2022

This is for inserting values at any position in the object preserving order of all elements (at the cost of linear complexity). Part 2/2 of #748.

This does not have the bug #763 since care is taken to avoid allocation unless necessary.

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #765 (d854374) into develop (ce144b5) will decrease coverage by 0.16%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #765      +/-   ##
===========================================
- Coverage    99.13%   98.97%   -0.17%     
===========================================
  Files           69       69              
  Lines         6587     6623      +36     
===========================================
+ Hits          6530     6555      +25     
- Misses          57       68      +11     
Impacted Files Coverage Δ
include/boost/json/object.hpp 100.00% <ø> (ø)
include/boost/json/impl/object.hpp 100.00% <100.00%> (ø)
include/boost/json/impl/object.ipp 100.00% <100.00%> (ø)
include/boost/json/basic_parser_impl.hpp 98.33% <0.00%> (-0.88%) ⬇️
include/boost/json/detail/config.hpp 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce144b5...d854374. Read the comment docs.

@cppalliance-bot
Copy link

@gummif
Copy link
Contributor Author

gummif commented Oct 12, 2022

One thing that could reduce duplication is to implement insert in terms of stable_insert_impl using pos as end().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants