Is there any drawbacks in providing operator+ or operator- to bidirectional iterators?
问题 The bidirectional iterators have no luxuries like random access iterators, and hence need to depend upon the std::next and std::prev, when someone needs to do operations like std::set<int> s{ 1, 2, 3, 4, 5 }; //std::set<int> s2(s.cbegin(), s.cbegin() + 2); // won't work as there is no operator+ for std::set::const_iterator std::set<int> s2(s.cbegin(), std::next(s.cbegin(), 2)); //std::set<int> s3(s.cbegin(), s.cend() - 2); // won't work as there is no operator- for std::set::const_iterator