[llvm-commits] CVS: llvm/include/Support/ilist
Chris Lattner
lattner at cs.uiuc.edu
Thu Jun 3 13:53:02 PDT 2004
Changes in directory llvm/include/Support:
ilist updated: 1.18 -> 1.19
---
Log message:
Only use the non-standards-compliant std::distance on the compiler that is
buggy, not for all compilers that are not GCC 3
---
Diffs of the changes: (+5 -4)
Index: llvm/include/Support/ilist
diff -u llvm/include/Support/ilist:1.18 llvm/include/Support/ilist:1.19
--- llvm/include/Support/ilist:1.18 Mon Feb 9 16:40:50 2004
+++ llvm/include/Support/ilist Thu Jun 3 13:48:59 2004
@@ -438,13 +438,14 @@
//
size_type size() const {
-#if __GNUC__ == 3
- size_type Result = std::distance(begin(), end());
-#else
+#if __GNUC__ == 2
+ // GCC 2.95 has a broken std::distance
size_type Result = 0;
std::distance(begin(), end(), Result);
-#endif
return Result;
+#else
+ return std::distance(begin(), end());
+#endif
}
iterator erase(iterator first, iterator last) {
More information about the llvm-commits
mailing list