[Libreoffice] [PATCH] o3tl build -vs- svn gcc

Tom Tromey tromey at redhat.com
Wed Aug 10 10:14:09 PDT 2011


I tried building LibreOffice with svn trunk gcc.

It dies in o3tl with:

In file included from /home/tromey/Space/LibreOffice/bootstrap/o3tl/qa/test-vector_pool.cxx:8:0:
/home/tromey/Space/LibreOffice/bootstrap/solver/350/unxlngx6.pro/inc/o3tl/vector_pool.hxx: In instantiation of ‘std::ptrdiff_t o3tl::detail::simple_pool_impl<ValueType, Container>::store(const ValueType&) [with ValueType = int, Container = std::vector<o3tl::detail::struct_from_value<int>::type, std::allocator<o3tl::detail::struct_from_value<int>::type> >, std::ptrdiff_t = long int]’:
/home/tromey/Space/LibreOffice/bootstrap/o3tl/qa/test-vector_pool.cxx:40:45:   required from here
/home/tromey/Space/LibreOffice/bootstrap/solver/350/unxlngx6.pro/inc/o3tl/vector_pool.hxx:68:21: error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/home/tromey/Space/LibreOffice/bootstrap/solver/350/unxlngx6.pro/inc/o3tl/vector_pool.hxx:68:21: note: declarations in dependent base ‘std::vector<o3tl::detail::struct_from_value<int>::type, std::allocator<o3tl::detail::struct_from_value<int>::type> >’ are not found by unqualified lookup
/home/tromey/Space/LibreOffice/bootstrap/solver/350/unxlngx6.pro/inc/o3tl/vector_pool.hxx:68:21: note: use ‘this->push_back’ instead


The appended patch fixes this problem by adding a 'this->' qualifier.

This is contributed under the LGPLv3+/MPL.

Tom

diff --git a/o3tl/inc/o3tl/vector_pool.hxx b/o3tl/inc/o3tl/vector_pool.hxx
index 6ef4e96..28299f0 100644
--- a/o3tl/inc/o3tl/vector_pool.hxx
+++ b/o3tl/inc/o3tl/vector_pool.hxx
@@ -65,7 +65,7 @@ namespace o3tl
                 }
                 else
                 {
-                    push_back(value_type(rCopy));
+                    this->push_back(value_type(rCopy));
                     return this->size()-1;
                 }
             }


More information about the LibreOffice mailing list