mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Only use the non-standards-compliant std::distance on the compiler that is
buggy, not for all compilers that are not GCC 3 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -438,13 +438,14 @@ public:
|
|||||||
//
|
//
|
||||||
|
|
||||||
size_type size() const {
|
size_type size() const {
|
||||||
#if __GNUC__ == 3
|
#if __GNUC__ == 2
|
||||||
size_type Result = std::distance(begin(), end());
|
// GCC 2.95 has a broken std::distance
|
||||||
#else
|
|
||||||
size_type Result = 0;
|
size_type Result = 0;
|
||||||
std::distance(begin(), end(), Result);
|
std::distance(begin(), end(), Result);
|
||||||
#endif
|
|
||||||
return Result;
|
return Result;
|
||||||
|
#else
|
||||||
|
return std::distance(begin(), end());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator erase(iterator first, iterator last) {
|
iterator erase(iterator first, iterator last) {
|
||||||
|
@@ -438,13 +438,14 @@ public:
|
|||||||
//
|
//
|
||||||
|
|
||||||
size_type size() const {
|
size_type size() const {
|
||||||
#if __GNUC__ == 3
|
#if __GNUC__ == 2
|
||||||
size_type Result = std::distance(begin(), end());
|
// GCC 2.95 has a broken std::distance
|
||||||
#else
|
|
||||||
size_type Result = 0;
|
size_type Result = 0;
|
||||||
std::distance(begin(), end(), Result);
|
std::distance(begin(), end(), Result);
|
||||||
#endif
|
|
||||||
return Result;
|
return Result;
|
||||||
|
#else
|
||||||
|
return std::distance(begin(), end());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator erase(iterator first, iterator last) {
|
iterator erase(iterator first, iterator last) {
|
||||||
|
Reference in New Issue
Block a user