]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG. 4732/head
authorDavid Wells <wellsd2@rpi.edu>
Tue, 8 Aug 2017 20:52:23 +0000 (16:52 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 8 Aug 2017 23:16:54 +0000 (19:16 -0400)
This workaround is no longer necessary in any compiler that we support.

Reverts 1699cced170.

cmake/checks/check_03_compiler_bugs.cmake
include/deal.II/base/config.h.in
include/deal.II/fe/fe_dgp.h
include/deal.II/fe/fe_dgp_nonparametric.h

index 74d2fad69014dc58f49260283ee8f12e1df12e36..ece3f866720ea42bd0980d674ac38c09ba6204c5 100644 (file)
@@ -135,37 +135,6 @@ CHECK_CXX_COMPILER_BUG(
   )
 
 
-#
-# Many compilers get this wrong (see Section 14.7.3.1, number (4)):
-#
-#   template <int dim> 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 <int dim> 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'
index 733fb6c4aa14362060ec13c4c71d4172468b2cd0..baab90e2a130be45fc9f6ab8af3522c1a7853d41 100644 (file)
@@ -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
index fbea1cc51758bb99870e85ad1f536c3580003baa..4875cfe7bdf917a4a2158bb22247b6d69425a962 100644 (file)
@@ -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
index 1052fd36ab9c0d7531468df931be4123869fdf05..12ae31c138d7b15aa1a4e9dc4b54b099108bb79a 100644 (file)
@@ -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
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.