Hello all,
I have come up with a new Nim blog post after a while: https://scripter.co/binding-nim-to-c-plus-plus-std-list/
I would love some feedback on the readability of the post (the flow, technical language, etc.). I have attempted to write the post as a small tutorial on importcpp.
i ran into iterator problems at work recently, and this is great work, thank you.
the next step i'm missing is how to iterate over iterator classes that have been defined using boost::iterator_facade. these are meant to be used with foreach, and don't work out of the box. i'll post a more detailed example later.
If you need more C++ STL container you can check out : https://github.com/Clonkk/nim-cppstl
The main limitation is that Nim =destroy and =copy hooks for object do not get called properly by the C++ container because they're not mapped to their C++ equivalent.
@kaushalmodi feel free to make PR if you want to add std::list
The main limitation is that Nim =destroy and =copy hooks for object do not get called properly by the C++ container because they're not mapped to their C++ equivalent.
I do not yet understand the destroy/copy concept properly. The toSeq proc I show in the post seems to work. In what scenario would the destroy/copy issue cause a real problem?
PR welcome if you want to add std::list to the repo
Yes, I can send a PR once I have mapped a good amount of that library, and also with doc-strings and tests added. I am this same person hehe.
If you need more C++ STL container you can check out : https://github.com/Clonkk/nim-cppstl
You missed reading references section of that post! :D
Yes, I can send a PR once I have mapped a good amount of that library, and also with doc-strings and tests added. I am this same person hehe.
Ah I knew the name was familiar !
You missed reading references section of that post! :D
I'll admit that I indeed skipped this part. Bad habit of mine to not read everything until the end ^^'