include/comphelper/parallelsort.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 5bf4eb0f5e20a8c24e37e68f47988b3d9b29c570 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Oct 15 10:06:57 2021 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Oct 15 14:42:22 2021 +0200 Correctly use swap customization point in generic code (for pre C++20) (see <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html> "Suggested Design for Customization Points") Change-Id: If641ce84b1114fbe4e9819ebf4d958130301dc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123626 Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Jenkins diff --git a/include/comphelper/parallelsort.hxx b/include/comphelper/parallelsort.hxx index 57eccc4770e3..94d86e0d119b 100644 --- a/include/comphelper/parallelsort.hxx +++ b/include/comphelper/parallelsort.hxx @@ -147,7 +147,8 @@ template <class RandItr> struct Sampler for (size_t nIdx = 0; nIdx < nSamples; ++nIdx) { size_t nSel = aGenerator() % nLen--; - std::swap(*(aBegin + nSel), *(aBegin + nLen)); + using namespace std; + swap(*(aBegin + nSel), *(aBegin + nLen)); pSamples[nIdx] = *(aBegin + nLen); } }