Add a patch that will hopefully help MSVC debugging.

This commit is contained in:
Ryan Curtin
2022-11-16 08:42:52 -05:00
parent bacaa23f93
commit 8a092891ec
+3 -1
View File
@@ -69,12 +69,14 @@
// Backport std::any from C+17 to C++11 to replace boost::any.
// Use mnmlstc backport implementation only if compiler does not
// support C++17.
#if __cplusplus < 201703L
#if __cplusplus < 201703L && !defined(_MSC_VER)
#include <mlpack/core/std_backport/any.hpp>
#include <mlpack/core/std_backport/string_view.hpp>
#define MLPACK_ANY core::v2::any
#define MLPACK_ANY_CAST core::v2::any_cast
#define MLPACK_STRING_VIEW core::v2::string_view
#elif __cplusplus < 201703L && defined(_MSC_VER)
#error "When using Visual Studio, mlpack should be compiled with /Zc:__cplusplus and /std:c++17 or newer."
#else
#include <any>
#include <string_view>