You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zim::Search::end() returns a meaningful end iterator only if the search object has been properly initialized before that by a call to zim::Search::begin(). As a result, the following code is an infinite loop:
const zim::Search search(archive);
... // initialize the search
const auto endOfSearch = search.end();
for ( const auto it = search.begin(); it != endOfSearch; ++it ) {
}
This is very counter-intuitive, especially given that both zim::Search::begin() and zim::Search::end() are const member functions.
The text was updated successfully, but these errors were encountered:
zim::Search::end()
returns a meaningful end iterator only if the search object has been properly initialized before that by a call tozim::Search::begin()
. As a result, the following code is an infinite loop:This is very counter-intuitive, especially given that both
zim::Search::begin()
andzim::Search::end()
areconst
member functions.The text was updated successfully, but these errors were encountered: