RangeV3:为什么不专门针对特定容器的算法?

时间:2017-03-13 14:41:12

标签: c++ algorithm stl range-v3

“旧”STL不允许说std::find专门用于std::setstd::unordered_map等的成员函数。它不能,因为前者使用迭代器,后者需要容器,而且从迭代器中无法获得容器。甚至还有一个问题(Specializing STL algorithms so they automatically call efficient container member functions when available)。

由于Range V3最终将焦点从迭代器移动到范围,因此可以预期最终std::find会自动专门用于std::set,而std::none_of_equal则会<img onmousedown="document.getElementById('scrollbox-table-nav-softer').src='your_image_1.jpg'" onmouseup="document.getElementById('scrollbox-table-nav-softer').src='your_image.jpg'" src="your_image.jpg" id="scrollbox-table-nav-softer"/> (如果它被采用)做你想做的事等等。

但是,阅读its currently implementation,我看不到有关此类功能的规定。为什么呢?

0 个答案:

没有答案