LibTorch uses C++ 2011, as stated here: https://discuss.pytorch.org/t/cant-build-libtorch-with-error-message-c2210-t-pack-expansions-cannot-be-used-as-arguments-to ...
Visual Studio report many errors in a custom dll project which using libtorch. These errors never appears in a exe project. And use opencv in the same way is ok.