From f53c9e6a864410cfd896dc41081508700d285ff2 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sun, 22 Jan 2017 22:13:01 -0500 Subject: [PATCH] MSVC fixes - enable compilation of bundled boost with MSVC 2017rc1 - remove static_assert that gets wrongly triggered during normal compilation --- .../boost-1.62.0/include/boost/config/compiler/visualc.hpp | 5 +++-- include/deal.II/dofs/dof_handler.h | 5 ++++- include/deal.II/fe/fe.h | 5 ++++- include/deal.II/grid/tria.h | 5 ++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bundled/boost-1.62.0/include/boost/config/compiler/visualc.hpp b/bundled/boost-1.62.0/include/boost/config/compiler/visualc.hpp index 72caff4974..dcf2759ef5 100644 --- a/bundled/boost-1.62.0/include/boost/config/compiler/visualc.hpp +++ b/bundled/boost-1.62.0/include/boost/config/compiler/visualc.hpp @@ -294,8 +294,9 @@ #endif // -// last known and checked version is 19.00.23026 (VC++ 2015 RTM): -#if (_MSC_VER > 1900) +// tjhei: taken from boost git repo +// last known and checked version is 19.10.24629 (VC++ 2017 RC): +#if (_MSC_VER > 1910) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index b94559a1cd..da182ff831 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -1094,12 +1094,15 @@ private: friend struct dealii::internal::DoFHandler::Implementation; friend struct dealii::internal::DoFHandler::Policy::Implementation; - // explicitly check for sensible template arguments + // explicitly check for sensible template arguments, but not on windows + // because MSVC creates bogus warnings during normal compilation #ifdef DEAL_II_WITH_CXX11 +#ifndef DEAL_II_MSVC static_assert (dim<=spacedim, "The dimension of a DoFHandler must be less than or " "equal to the space dimension in which it lives."); #endif +#endif }; diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index bab0e0d32a..e76edb0902 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -2722,12 +2722,15 @@ protected: friend class FESubfaceValues; friend class FESystem; - // explicitly check for sensible template arguments + // explicitly check for sensible template arguments, but not on windows + // because MSVC creates bogus warnings during normal compilation #ifdef DEAL_II_WITH_CXX11 +#ifndef DEAL_II_MSVC static_assert (dim<=spacedim, "The dimension of a FiniteElement must be less than or " "equal to the space dimension in which it lives."); #endif +#endif }; diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 28282d19e3..7428feb138 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -3526,12 +3526,15 @@ private: template friend class dealii::internal::Triangulation::TriaObjects; - // explicitly check for sensible template arguments + // explicitly check for sensible template arguments, but not on windows + // because MSVC creates bogus warnings during normal compilation #ifdef DEAL_II_WITH_CXX11 +#ifndef DEAL_II_MSVC static_assert (dim<=spacedim, "The dimension of a Triangulation must be less than or " "equal to the space dimension in which it lives."); #endif +#endif }; -- 2.39.5