diff --git a/src/mlpack/prereqs.hpp b/src/mlpack/prereqs.hpp index 67dbb7b381..5d7d48a93c 100644 --- a/src/mlpack/prereqs.hpp +++ b/src/mlpack/prereqs.hpp @@ -93,6 +93,14 @@ problems. Instead specify the C++11 standard (-std=c++11 with gcc or clang), \ or upgrade Boost to 1.59 or newer. #endif +// On Visual Studio, disable C4519 (default arguments for function templates) +// since it's by default an error, which doesn't even make any sense because +// it's part of the C++11 standard. +#ifdef _MSC_VER + #pragma warning(disable : 4519) + #define ARMA_USE_CXX11 +#endif + // Now include Armadillo through the special mlpack extensions. #include #include @@ -105,13 +113,6 @@ or upgrade Boost to 1.59 or newer. #include #include -// On Visual Studio, disable C4519 (default arguments for function templates) -// since it's by default an error, which doesn't even make any sense because -// it's part of the C++11 standard. -#ifdef _MSC_VER - #pragma warning(disable : 4519) - #define ARMA_USE_CXX11 -#endif // This can be removed with Visual Studio supports an OpenMP version with // unsigned loop variables. #ifdef _WIN32