2
0
mirror of https://github.com/boostorg/polygon.git synced 2026-02-02 09:02:13 +00:00

Polygon: fixing ticket #8197 (range/algorithm conflicts with polygon).

[SVN r83507]
This commit is contained in:
Andrii Sydorchuk
2013-03-20 20:36:33 +00:00
parent 4f5108d143
commit 0b422e56a6

View File

@@ -64,7 +64,9 @@ namespace boost { namespace polygon{
//inline CountTouch& operator=(int count) { counts[0] = counts[1] = count; return *this; }
inline CountTouch& operator=(const CountTouch& count) { counts = count.counts; return *this; }
inline int& operator[](int index) {
std::vector<std::pair<int, int> >::iterator itr = lower_bound(counts.begin(), counts.end(), std::make_pair(index, int(0)));
std::vector<std::pair<int, int> >::iterator itr =
std::lower_bound(counts.begin(), counts.end(),
std::make_pair(index, int(0)));
if(itr != counts.end() && itr->first == index) {
return itr->second;
}