From 75c257327e084325f369e020fc8e4ad960f25526 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 9 Jan 2017 13:11:58 +0200 Subject: [PATCH] Fix G++ 4.4 issue G++ 4.4 on CentOS6 seems to get confused by direct inheritance from templates. Worked around by introducing typedef. --- include/maxscale/buffer.hh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/maxscale/buffer.hh b/include/maxscale/buffer.hh index ca1308495..49ccf57ff 100644 --- a/include/maxscale/buffer.hh +++ b/include/maxscale/buffer.hh @@ -110,18 +110,19 @@ public: class const_iterator; + // Buffer type, type of pointer to element and type of reference to element. + typedef iterator_base iterator_base_typedef; + /** * A forward iterator to Buffer. */ - class iterator : public iterator_base // Type of reference to element + class iterator : public iterator_base_typedef { friend class const_iterator; public: explicit iterator(GWBUF* pBuffer = NULL) - : iterator_base(pBuffer) + : iterator_base_typedef(pBuffer) {} iterator& operator++() @@ -154,20 +155,21 @@ public: } }; + // Buffer type, type of pointer to element and type of reference to element. + typedef iterator_base const_iterator_base_typedef; + /** * A const forward iterator to Buffer. */ - class const_iterator : public iterator_base // Type of referece to element + class const_iterator : public const_iterator_base_typedef { public: explicit const_iterator(const GWBUF* pBuffer = NULL) - : iterator_base(pBuffer) + : const_iterator_base_typedef(pBuffer) {} const_iterator(const Buffer::iterator& rhs) - : iterator_base(rhs.m_pBuffer) + : const_iterator_base_typedef(rhs.m_pBuffer) {} const_iterator& operator++()