From 03fbd44b85d7a4671fa3acf27fb0e476e351eec5 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 8 Aug 2017 16:52:23 -0400 Subject: [PATCH] Remove DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG. This workaround is no longer necessary in any compiler that we support. Reverts 1699cced170. --- cmake/checks/check_03_compiler_bugs.cmake | 31 ----------------------- include/deal.II/base/config.h.in | 1 - include/deal.II/fe/fe_dgp.h | 6 +---- include/deal.II/fe/fe_dgp_nonparametric.h | 5 +--- 4 files changed, 2 insertions(+), 41 deletions(-) diff --git a/cmake/checks/check_03_compiler_bugs.cmake b/cmake/checks/check_03_compiler_bugs.cmake index 74d2fad690..ece3f86672 100644 --- a/cmake/checks/check_03_compiler_bugs.cmake +++ b/cmake/checks/check_03_compiler_bugs.cmake @@ -135,37 +135,6 @@ CHECK_CXX_COMPILER_BUG( ) -# -# Many compilers get this wrong (see Section 14.7.3.1, number (4)): -# -# template struct T { -# static const int i; -# }; -# -# template <> const int T<1>::i; -# template <> const int T<1>::i = 1; -# -# First, by Section 14.7.3.14 of the standard, the first template<> -# line must necessarily be the _declaration_ of a specialization, -# and the second is then its definition. There is therefore no -# reason to report a doubly defined variable (Intel ICC 6.0), or -# to choke on these lines at all (Sun Forte) -# -# - Wolfgang Bangerth, Matthias Maier, rewritten 2012 -# -CHECK_CXX_COMPILER_BUG( - " - template struct T - { - static const int i; - }; - template <> const int T<1>::i; - template <> const int T<1>::i = 1; - int main() {return 0;} - " - DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG - ) - # # Some older versions of gcc compile this, despite the 'explicit' diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 733fb6c4aa..baab90e2a1 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -67,7 +67,6 @@ #cmakedefine DEAL_II_TEMPL_SPEC_FRIEND_BUG #cmakedefine DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG -#cmakedefine DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG #cmakedefine DEAL_II_CONST_MEMBER_DEDUCTION_BUG #cmakedefine DEAL_II_BOOST_BIND_COMPILER_BUG #cmakedefine DEAL_II_BIND_NO_CONST_OP_PARENTHESES diff --git a/include/deal.II/fe/fe_dgp.h b/include/deal.II/fe/fe_dgp.h index fbea1cc517..4875cfe7bd 100644 --- a/include/deal.II/fe/fe_dgp.h +++ b/include/deal.II/fe/fe_dgp.h @@ -491,9 +491,7 @@ private: #ifndef DOXYGEN -// declaration of explicit specializations of member variables, if the -// compiler allows us to do that (the standard says we must) -#ifndef DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG +// declaration of explicit specializations of member variables template <> const double *const FE_DGP<1>::Matrices::projection_matrices[][GeometryInfo<1>::max_children_per_cell]; @@ -525,8 +523,6 @@ const double *const FE_DGP<2,3>::Matrices::projection_matrices[][GeometryInfo<2> template <> const unsigned int FE_DGP<2,3>::Matrices::n_projection_matrices; -#endif - #endif // DOXYGEN DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/fe/fe_dgp_nonparametric.h b/include/deal.II/fe/fe_dgp_nonparametric.h index 1052fd36ab..12ae31c138 100644 --- a/include/deal.II/fe/fe_dgp_nonparametric.h +++ b/include/deal.II/fe/fe_dgp_nonparametric.h @@ -609,9 +609,7 @@ private: #ifndef DOXYGEN -// declaration of explicit specializations of member variables, if the -// compiler allows us to do that (the standard says we must) -#ifndef DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG +// declaration of explicit specializations of member variables template <> const double *const FE_DGPNonparametric<1,1>::Matrices::embedding[][GeometryInfo<1>::max_children_per_cell]; @@ -647,7 +645,6 @@ const double *const FE_DGPNonparametric<3,3>::Matrices::projection_matrices[][Ge template <> const unsigned int FE_DGPNonparametric<3,3>::Matrices::n_projection_matrices; -#endif #endif // DOXYGEN -- 2.39.5