JuliaInterop / libcxxwrap-julia

C++ library for backing CxxWrap.jl
Other
85 stars 43 forks source link

Added the Iterator wrapper #133

Closed abdoei closed 4 months ago

abdoei commented 1 year ago

https://github.com/JuliaInterop/CxxWrap.jl.git

(I added the above line because this is needed by CI now - Bart)

I have added the iterator wrapper support for the STL containers [with one argument template] and edited the StdDeque container to be used with it and added the constructor of the Deque that takes size_type count, const T& value = T(), const Allocator& alloc = Allocator(), tested it on Julia, and it worked as expected

barche commented 1 year ago

@abdoei The Mac compile error is something that needs to be fixed: https://github.com/JuliaInterop/libcxxwrap-julia/actions/runs/6285226887/job/17138204435?pr=133#step:4:70

abdoei commented 7 months ago

could you review this pr please

barche commented 7 months ago

Currently all tests are failing, I think because the std::deque iteratorbegin method requires the wrapper type to be defined first. I think you need a two-staged approach here, where you first add the wrapper type itself and only then add its methods, or first add the deque type, then add the wrapper and its methods, and then add the deque methods.

abdoei commented 6 months ago

I opened a PR on the Julia part that contains the tests and all worked well on my machine

barche commented 4 months ago

This is now integrated in https://github.com/JuliaInterop/libcxxwrap-julia/pull/170