summaryrefslogtreecommitdiff
path: root/src/base/range.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/range.hh')
-rw-r--r--src/base/range.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/base/range.hh b/src/base/range.hh
index d9542c0ca..ac64a37f9 100644
--- a/src/base/range.hh
+++ b/src/base/range.hh
@@ -316,7 +316,13 @@ template <class T, class U>
inline bool
operator<(const Range<T> &range, const U &pos)
{
- return range.end < pos;
+ // with -std=gnu++0x, gcc and clang get confused when range.end is
+ // compared to pos using the operator "<", and the parser expects it
+ // to be the opening bracket for a template parameter,
+ // i.e. range.end<pos>(...);, the reason seems to be the range-type
+ // iteration introduced in c++11 where begin and end are members
+ // that return iterators
+ return operator<(range.end, pos);
}
/**