summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-27 10:58:28 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-27 10:58:28 +0300
commit1b3adaab25c4f0e4288b261f973906bbf6b394c2 (patch)
treed7de7c23c057e92c5935d56de1a9bc70e7bb5d47 /include
parentbf1aa7569e7a29fae2b1cdf36b840e98130fda4a (diff)
downloadmariadb-git-1b3adaab25c4f0e4288b261f973906bbf6b394c2.tar.gz
Fix the build with GCC 4.1.2
The build was broken on CentOS 5 and CentOS 6 as a result of commit 18d8f06f31cbe3913e1c80c0c5120f23e036bd3e introducing some constructs that old GCC versions could not cope with.
Diffstat (limited to 'include')
-rw-r--r--include/ilist.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/ilist.h b/include/ilist.h
index ae87b79d54e..746061c397d 100644
--- a/include/ilist.h
+++ b/include/ilist.h
@@ -210,7 +210,7 @@ public:
sized_ilist() : size_(0) {}
- size_type size() const { return size_; }
+ std::size_t size() const { return size_; }
void clear()
{
@@ -218,25 +218,30 @@ public:
size_= 0;
}
- iterator insert(iterator pos, reference value)
+ typename ilist<T, Tag>::iterator
+ insert(typename ilist<T, Tag>::iterator pos,
+ typename ilist<T, Tag>::reference value)
{
++size_;
return BASE::insert(pos, value);
}
- iterator erase(iterator pos)
+ typename ilist<T, Tag>::iterator erase(typename ilist<T, Tag>::iterator pos)
{
--size_;
return BASE::erase(pos);
}
- void push_back(reference value) { insert(BASE::end(), value); }
+ void push_back(typename ilist<T, Tag>::reference value)
+ { insert(BASE::end(), value); }
void pop_back() { erase(BASE::end()); }
- void push_front(reference value) { insert(BASE::begin(), value); }
+ void push_front(typename ilist<T, Tag>::reference value)
+ { insert(BASE::begin(), value); }
void pop_front() { erase(BASE::begin()); }
- void remove(reference value) { erase(iterator(&value)); }
+ void remove(typename ilist<T, Tag>::reference value)
+ { erase(iterator(&value)); }
private:
size_t size_;