From 5a81dc000b23bd80185db9f6141114caf91d0481 Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Fri, 26 Jan 2024 01:51:24 +0200 Subject: [PATCH] fix ambiguous call to overloaded function CameraSet.h(331) --- .github/workflows/build-python.yml | 12 +++++++++--- .github/workflows/build-windows.yml | 27 ++++++++++++++++----------- gtsam/geometry/CameraSet.h | 4 ++++ gtsam/nonlinear/Values-inl.h | 2 ++ 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 520e94c09b..ce3685f878 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -32,7 +32,7 @@ jobs: ubuntu-20.04-gcc-9-tbb, ubuntu-20.04-clang-9, macOS-11-xcode-13.4.1, - windows-2019-msbuild, + windows-2022-msbuild, ] build_type: [Release] @@ -59,8 +59,8 @@ jobs: compiler: xcode version: "13.4.1" - - name: windows-2019-msbuild - os: windows-2019 + - name: windows-2022-msbuild + os: windows-2022 platform: 64 steps: @@ -109,6 +109,12 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: x${{matrix.platform}} + toolset: 14.38 + + - name: cl version (Windows) + if: runner.os == 'Windows' + shell: cmd + run: cl - name: Setup python (Windows) uses: actions/setup-python@v4 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index f0568394fa..a73842a982 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -27,7 +27,7 @@ jobs: # Github Actions requires a single row to be added to the build matrix. # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. name: [ - windows-2019-cl, + windows-2022-cl, ] build_type: [ @@ -37,12 +37,25 @@ jobs: build_unstable: [ON] include: - - name: windows-2019-cl - os: windows-2019 + - name: windows-2022-cl + os: windows-2022 compiler: cl platform: 64 steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup msbuild + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x${{ matrix.platform }} + toolset: 14.38 + + - name: cl version + shell: cmd + run: cl + - name: Install Dependencies shell: powershell run: | @@ -91,14 +104,6 @@ jobs: # Set the BOOST_ROOT variable echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup msbuild - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: x${{ matrix.platform }} - - name: Configuration shell: bash run: | diff --git a/gtsam/geometry/CameraSet.h b/gtsam/geometry/CameraSet.h index cf4beb8830..26d4952c8b 100644 --- a/gtsam/geometry/CameraSet.h +++ b/gtsam/geometry/CameraSet.h @@ -327,12 +327,16 @@ class CameraSet : public std::vector> { * g = F' * (b - E * P * E' * b) * Fixed size version */ +#ifdef _WIN32 +#if _MSC_VER < 1937 template // N = 2 or 3 static SymmetricBlockMatrix SchurComplement( const FBlocks& Fs, const Matrix& E, const Eigen::Matrix& P, const Vector& b) { return SchurComplement(Fs, E, P, b); } +#endif +#endif /// Computes Point Covariance P, with lambda parameter template // N = 2 or 3 (point dimension) diff --git a/gtsam/nonlinear/Values-inl.h b/gtsam/nonlinear/Values-inl.h index 1fe909a110..59ec2089d9 100644 --- a/gtsam/nonlinear/Values-inl.h +++ b/gtsam/nonlinear/Values-inl.h @@ -200,6 +200,7 @@ namespace gtsam { // Added this section for compile gtsam python on windows. // msvc don't deduct the template arguments correctly, due possible bug in msvc. #ifdef _WIN32 +#if _MSC_VER < 1937 // Handle dynamic matrices template struct handle_matrix, true> { @@ -250,6 +251,7 @@ namespace gtsam { (M == Eigen::Dynamic || N == Eigen::Dynamic)>()(j, pointer); } }; +#endif // #if _MSC_VER < 1937 #endif // #ifdef _WIN32 } // internal