X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Flyxalgo.h;h=d1aa023e1e918dd9ecfe2ad4799245f9070598fe;hb=8d640dc77608bedddb5b00982c23665584f52d21;hp=19c2485a34241b9cf5ee51c69d92360b2a0e24d7;hpb=d8d9db08797dc968056d652287598f2590acabce;p=lyx.git diff --git a/src/support/lyxalgo.h b/src/support/lyxalgo.h index 19c2485a34..d1aa023e1e 100644 --- a/src/support/lyxalgo.h +++ b/src/support/lyxalgo.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. * @@ -73,21 +73,6 @@ OutputIter copy_if(InputIter first, InputIter last, } -/// A slot in replacement for std::count for systems where it is broken. -template -typename std::iterator_traits::difference_type -count (Iterator first, Iterator last, T const & value) -{ -#ifdef HAVE_STD_COUNT - return std::count(first, last, value); -#else - typename std::iterator_traits::difference_type n = 0; - while (first != last) - if (*first++ == value) ++n; - return n; -#endif -} - /// Remove all duplicate entries in c. template void eliminate_duplicates(C & c) @@ -98,6 +83,12 @@ void eliminate_duplicates(C & c) c.erase(std::unique(c.begin(), c.end()), c.end()); } + +using std::next; + + +using std::prev; + } // namespace lyx #endif // LYX_ALGO_H