Blender Git Loki
Git Commits -> Revision 98721c8
Revision 98721c8 by Jacques Lucke (master) March 20, 2021, 14:42 (GMT) |
BLI: improve support for generic algorithms with c++ containers Some generic algorithms from the standard library like `std::any_of` did not work with all container and iterator types. To improve the situation, this patch adds various type members to containers and iterators. Custom iterators for Set, Map and IndexRange now have an iterator category, which soe algorithms require. IndexRange could become a random access iterator, but adding all the missing methods can be done when it is necessary. |
Commit Details:
Full Hash: 98721c85431d223c895a25d63dafb9e6637d34c4
Parent Commit: 59d3ec1
Lines Changed: +197, -3
12 Modified Paths:
/source/blender/blenlib/BLI_array.hh (+10, -0) (Diff)
/source/blender/blenlib/BLI_index_range.hh (+22, -3) (Diff)
/source/blender/blenlib/BLI_map.hh (+38, -0) (Diff)
/source/blender/blenlib/BLI_multi_value_map.hh (+3, -0) (Diff)
/source/blender/blenlib/BLI_set.hh (+34, -0) (Diff)
/source/blender/blenlib/BLI_span.hh (+18, -0) (Diff)
/source/blender/blenlib/BLI_stack.hh (+8, -0) (Diff)
/source/blender/blenlib/BLI_vector.hh (+10, -0) (Diff)
/source/blender/blenlib/BLI_vector_set.hh (+10, -0) (Diff)
/source/blender/blenlib/tests/BLI_index_range_test.cc (+9, -0) (Diff)
/source/blender/blenlib/tests/BLI_map_test.cc (+17, -0) (Diff)
/source/blender/blenlib/tests/BLI_set_test.cc (+18, -0) (Diff)
/source/blender/blenlib/BLI_index_range.hh (+22, -3) (Diff)
/source/blender/blenlib/BLI_map.hh (+38, -0) (Diff)
/source/blender/blenlib/BLI_multi_value_map.hh (+3, -0) (Diff)
/source/blender/blenlib/BLI_set.hh (+34, -0) (Diff)
/source/blender/blenlib/BLI_span.hh (+18, -0) (Diff)
/source/blender/blenlib/BLI_stack.hh (+8, -0) (Diff)
/source/blender/blenlib/BLI_vector.hh (+10, -0) (Diff)
/source/blender/blenlib/BLI_vector_set.hh (+10, -0) (Diff)
/source/blender/blenlib/tests/BLI_index_range_test.cc (+9, -0) (Diff)
/source/blender/blenlib/tests/BLI_map_test.cc (+17, -0) (Diff)
/source/blender/blenlib/tests/BLI_set_test.cc (+18, -0) (Diff)