From 79b07210dbd7ac871b7310d142a4e6446535a6a6 Mon Sep 17 00:00:00 2001 From: Eugene Freyman Date: Thu, 4 Jan 2018 16:43:28 +0200 Subject: [PATCH] fixed ARMA_USE_CXX11 placement --- src/mlpack/prereqs.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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