diff --git a/.github/workflows/build-classic.yml b/.github/workflows/build-classic.yml index 9bb2f38..4d5f7e8 100644 --- a/.github/workflows/build-classic.yml +++ b/.github/workflows/build-classic.yml @@ -24,6 +24,9 @@ jobs: gcc_version: [ '4.8.5' ] cmake_version: [ '3.9.6' ] build_type: [ Release ] + include: + - gcc_version: '4.8.5' + libuv_version: '1.44.2' name: "In Container GCC ${{matrix.gcc_version}} ${{matrix.build_type}}" @@ -57,6 +60,12 @@ jobs: gcc --version g++ --version + - name: Checkout libuv + run: | + cd libuv + git checkout "v${{matrix.libuv_version}}" + cd .. + - name: Configure run: | mkdir -p build diff --git a/.github/workflows/build-msvc-std.yml b/.github/workflows/build-msvc-std.yml index b25a0e8..543ecd0 100644 --- a/.github/workflows/build-msvc-std.yml +++ b/.github/workflows/build-msvc-std.yml @@ -45,6 +45,8 @@ jobs: - name: Configure run: > cmake -B "${{ steps.strings.outputs.build-output-dir }}" + -DCMAKE_CXX_COMPILER=${{ matrix.cl }} + -DCMAKE_C_COMPILER=${{ matrix.cl }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DSTD=${{ matrix.std }} -S "${{ github.workspace }}" @@ -52,8 +54,6 @@ jobs: - name: Build run: >- cmake --build "${{ steps.strings.outputs.build-output-dir }}" - -DCMAKE_CXX_COMPILER=${{ matrix.cl }} - -DCMAKE_C_COMPILER=${{ matrix.cl }} --config ${{ matrix.build_type }} - name: Test diff --git a/include/uvcxx/utils/apply.h b/include/uvcxx/utils/apply.h index 33cd94b..60d211e 100644 --- a/include/uvcxx/utils/apply.h +++ b/include/uvcxx/utils/apply.h @@ -12,10 +12,12 @@ namespace uvcxx { #if UVCXX_STD_APPLY - template + + template inline decltype(auto) proxy_apply(F &&f, T &&t) { return std::apply(std::forward(f), std::forward(t)); } + #else namespace inner { template @@ -26,11 +28,6 @@ namespace uvcxx { public: using Ret = decltype(std::declval()(std::declval()...)); - template - Ret operator()(F &&f, T &&t) { - return apply(std::forward(f), std::forward(t)); - } - template::type = 0> Ret apply(F &&f, T &&) { return f(); @@ -130,6 +127,11 @@ namespace uvcxx { std::get<8>(std::forward(t)), std::get<9>(std::forward(t))); } + + template + Ret operator()(F &&f, T &&t) { + return this->apply(std::forward(f), std::forward(t)); + } }; }