sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

`usertype_container.hpp`: replace `std::input_iterator_tag`/`std::random_access_iterator_tag` with template type parameters.

Open deadlocklogic opened this issue 2 years ago • 1 comments

Consider when bindings with libraries which are standard STL drop in replacements like for instance: EASTL, Boost... usertype_container_default is tightly dependent on std::input_iterator_tag/std::random_access_iterator_tag, but for instance EASTL has its own input_iterator_tag/random_access_iterator_tag structs. So instead letting the user rewrite all the usertype_container and bloat his code, we can simply convert these explicit types to template type parameters. Thanks.

deadlocklogic avatar Nov 07 '23 19:11 deadlocklogic

An input_iterator_tag_trait/random_access_iterator_tag_trait could be handy too. The problem can be fairly easily solved thought and lessen the margin of error and code bloat/redundancy.

deadlocklogic avatar Nov 07 '23 19:11 deadlocklogic