mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +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:
parent
78b648c5e3
commit
6bf7ca5f6f
@ -438,13 +438,14 @@ public:
|
||||
//
|
||||
|
||||
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) {
|
||||
|
@ -438,13 +438,14 @@ public:
|
||||
//
|
||||
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user