ipc-sim / IPC

Incremental Potential Contact (IPC) is for robust and accurate time stepping of nonlinear elastodynamics. IPC guarantees intersection- and inversion-free trajectories regardless of materials, time-step sizes, velocities, or deformation severity.
https://ipc-sim.github.io/
MIT License
574 stars 73 forks source link

template deducing issue on Windows #28

Closed xarthurx closed 2 years ago

xarthurx commented 3 years ago

I'm trying to compile IPC on Windows with MSVC.

image

The issue is mainly caused by the static template function IglUtils::makePD, IglUtils::flipDet_SVD and IglUtils::computeCofactorMtr, where the compiler cannot deduce template argument for the variables these functions trying to apply to.

Any ideas or is this because of the platform?

xarthurx commented 3 years ago

OK, this seems to be a common issue for MSVC.

Reference and solution: https://stackoverflow.com/questions/58520935/avoiding-ambiguous-parameters-in-templated-eigen-functions-with-msvs