ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.06k stars 492 forks source link

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

Open deadlocklogic opened 8 months ago

deadlocklogic commented 8 months ago

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 commented 8 months ago

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.