diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1059d85..2d2122a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,8 @@ jobs: buildtype: "boost" packages: "" packages_to_remove: "" - os: "ubuntu-16.04" + os: "ubuntu-20.04" + container: "ubuntu:16.04" cxx: "g++" sources: "" llvm_os: "" @@ -30,9 +31,10 @@ jobs: cxxstd: "03,11" - name: "TOOLSET=clang CXXSTD=03,11,14,1z Job 1" buildtype: "boost" - packages: "libstdc++-4.9-dev" + packages: "libstdc++-4.9-dev clang" packages_to_remove: "" - os: "ubuntu-16.04" + os: "ubuntu-20.04" + container: "ubuntu:16.04" cxx: "clang++" sources: "" llvm_os: "" @@ -47,6 +49,16 @@ jobs: - name: Check if running in container if: matrix.container != '' run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV + - name: If running in container, upgrade packages + if: matrix.container != '' + run: | + apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev + sudo apt-add-repository ppa:git-core/ppa + sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git + python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))') + sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py + sudo python3 get-pip.py + sudo /usr/local/bin/pip install cmake - uses: actions/checkout@v2 diff --git a/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp b/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp index 3dc92f2..1a09898 100644 --- a/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp +++ b/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp @@ -13,14 +13,16 @@ #ifndef __BOOST_SORT_PARALLEL_DETAIL_PARALLEL_STABLE_SORT_HPP #define __BOOST_SORT_PARALLEL_DETAIL_PARALLEL_STABLE_SORT_HPP -#include -#include +#include #include #include #include #include #include #include +#include +#include + namespace boost { @@ -189,8 +191,12 @@ ::parallel_stable_sort (Iter_t first, Iter_t last, Compare comp, throw std::bad_alloc(); }; - range_buffer = move_forward(range_buffer, range_first); + range_buffer = move_construct(range_buffer, range_first); range_initial = merge_half(range_initial, range_buffer, range_second, comp); + destroy (range_buffer); + + + }; // end of constructor // diff --git a/include/boost/sort/pdqsort/pdqsort.hpp b/include/boost/sort/pdqsort/pdqsort.hpp index 511b4d9..8352e39 100644 --- a/include/boost/sort/pdqsort/pdqsort.hpp +++ b/include/boost/sort/pdqsort/pdqsort.hpp @@ -266,7 +266,7 @@ namespace pdqsort_detail { } // Swap elements and update block sizes and first/last boundaries. - size_t num = std::min(num_l, num_r); + size_t num = (std::min)(num_l, num_r); swap_offsets(offsets_l_base, offsets_r_base, offsets_l + start_l, offsets_r + start_r, num, num_l == num_r);