sc/inc/table.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b73e4660af577609621461c33693b629e9b5a603 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Mar 21 17:45:30 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Mar 21 22:46:23 2022 +0100
ScColumnsRange::Iterator actual needs to be bidirectional ...since 1463625ae26900d2461fd72a5a2c894b9f1b8726 "dynamic column container: fix some more for loops" started to use it with std::reverse_iterator (but apparently forgot to update the iterator_category, causing > In file included from sc/source/core/data/column.cxx:20: > In file included from sc/inc/column.hxx:22: > In file included from sc/inc/global.hxx:22: > In file included from sc/inc/address.hxx:22: > In file included from include/rtl/ustrbuf.hxx:35: > In file included from ~/llvm/inst/bin/../include/c++/v1/string_view:206: > In file included from ~/llvm/inst/bin/../include/c++/v1/__string:13: > In file included from ~/llvm/inst/bin/../include/c++/v1/__algorithm/copy.h:12: > In file included from ~/llvm/inst/bin/../include/c++/v1/__algorithm/unwrap_iter.h:14: > In file included from ~/llvm/inst/bin/../include/c++/v1/iterator:669: > In file included from ~/llvm/inst/bin/../include/c++/v1/__iterator/reverse_access.h:14: > ~/llvm/inst/bin/../include/c++/v1/__iterator/reverse_iterator.h:53:5: error: static_assert failed due to requirement '__is_cpp17_bidirectional_iterator<ScColumnsRange::Iterator>::value || bidirectional_iterator<ScColumnsRange::Iterator>' "reverse_iterator<It> requires It to be a bidirectional iterator." > static_assert(__is_cpp17_bidirectional_iterator<_Iter>::value || bidirectional_iterator<_Iter>, > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sc/inc/table.hxx:146:37: note: in instantiation of template class 'std::reverse_iterator<ScColumnsRange::Iterator>' requested here > std::reverse_iterator<Iterator> rbegin() { return std::reverse_iterator<Iterator>(maEnd); } > ^ etc.) Change-Id: Ice7527412a379a5ecb655349386e8814c911e87e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131909 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 532f6cf10124..623c9fe32a70 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -124,7 +124,7 @@ class ScColumnsRange final { std::vector<std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn>>>::const_iterator maColIter; public: - typedef std::input_iterator_tag iterator_category; + typedef std::bidirectional_iterator_tag iterator_category; typedef SCCOL value_type; typedef SCCOL difference_type; typedef const SCCOL* pointer;