Comments (5)
Might also consider adding erase_and_dispose in boost intrusive style.
from ygg.
You are right. I added erasing by iterator in e073e63
I'm hesitant to also allow erasing by const_iterator
- in an intrusive tree, erasure changes the underlying node, thus I would have to cast away constness there. Does this solve your problem?
from ygg.
erase should return the iterator to the next element
from ygg.
You are right - Ygg deviates from STL in this regard. Returning an iterator to the next element introduces a (small, but still…) performance penalty. Thus I'm reluctant to add that as a default.
I have added a TreeFlag
named STL_ERASE
which will make the erase()
methods adhere to STL standards - returning an iterator to the next element, etc. See https://tinloaf.github.io/ygg/classygg_1_1RBTree.html#add5fdd34b982d1fc29be8051333219c2 for documentation. Never mind the weird return type - that's just the magic I use to switch between STL and non-STL version.
Does that help you?
from ygg.
I'll assume that the STL_ERASE
option solved your problem. If you still experience problems, feel free to reopen this resp. create a new issue. Thanks for reporting!
from ygg.
Related Issues (8)
- Question: Tree with NodeUpdater
- Passing a {0, 0} in the intervaltree example HOT 4
- dump_to_dot generates invalid dot files HOT 2
- Bad const_cast in BinarySearchTree::find const overload HOT 1
- Is the method query() of intervalTree thread safe? HOT 2
- Boost Hana for_each() not working. Failing static assert. HOT 1
- It is hard to understand, which PAPI is used in the project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ygg.