From: Wolfgang Bangerth Date: Mon, 6 May 2002 13:32:42 +0000 (+0000) Subject: Disable the declaration of explicit specializations of member variables if the compil... X-Git-Tag: v8.0.0~18038 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1699cced170e343b67e9f14ac2b4647538748bd7;p=dealii.git Disable the declaration of explicit specializations of member variables if the compiler does not understand them. The standard says that they are necessary, but what can we do if they are not understood :-( ?? git-svn-id: https://svn.dealii.org/trunk@5826 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_dgp.h b/deal.II/deal.II/include/fe/fe_dgp.h index 42beadd368..4dc9e2af9f 100644 --- a/deal.II/deal.II/include/fe/fe_dgp.h +++ b/deal.II/deal.II/include/fe/fe_dgp.h @@ -322,8 +322,9 @@ class FE_DGP : public FiniteElement }; -// declaration of explicit specializations - +// 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 template <> const double * const FE_DGP<1>::Matrices::embedding[][GeometryInfo<1>::children_per_cell]; @@ -359,6 +360,6 @@ const double * const FE_DGP<3>::Matrices::projection_matrices[][GeometryInfo<3>: template <> const unsigned int FE_DGP<3>::Matrices::n_projection_matrices; - +#endif #endif diff --git a/deal.II/deal.II/include/fe/fe_dgq.h b/deal.II/deal.II/include/fe/fe_dgq.h index 66d3fe65a7..d452fa0276 100644 --- a/deal.II/deal.II/include/fe/fe_dgq.h +++ b/deal.II/deal.II/include/fe/fe_dgq.h @@ -351,8 +351,9 @@ class FE_DGQ : public FiniteElement }; -// declaration of explicit specializations - +// 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 template <> const double * const FE_DGQ<1>::Matrices::embedding[]; @@ -388,6 +389,6 @@ const double * const FE_DGQ<3>::Matrices::projection_matrices[]; template <> const unsigned int FE_DGQ<3>::Matrices::n_projection_matrices; - +#endif #endif diff --git a/deal.II/deal.II/include/fe/fe_q.h b/deal.II/deal.II/include/fe/fe_q.h index 109dd7aadf..d8b9a85d25 100644 --- a/deal.II/deal.II/include/fe/fe_q.h +++ b/deal.II/deal.II/include/fe/fe_q.h @@ -662,6 +662,9 @@ template <> void FE_Q<1>::initialize_unit_face_support_points (); template <> void FE_Q<1>::face_lexicographic_to_hierarchic_numbering (const unsigned int, std::vector&); +// 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 template <> const double * const FE_Q<1>::Matrices::embedding[][GeometryInfo<1>::children_per_cell]; @@ -701,6 +704,6 @@ const double * const FE_Q<3>::Matrices::constraint_matrices[]; template <> const unsigned int FE_Q<3>::Matrices::n_constraint_matrices; - +#endif #endif diff --git a/deal.II/deal.II/include/fe/mapping.h b/deal.II/deal.II/include/fe/mapping.h index a58d785286..1240e8a725 100644 --- a/deal.II/deal.II/include/fe/mapping.h +++ b/deal.II/deal.II/include/fe/mapping.h @@ -387,10 +387,13 @@ class Mapping : public Subscriptor /* -------------- declaration of explicit specializations ------------- */ +// 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 template<> const unsigned int Mapping<1>::normal_directions[2]; template<> const unsigned int Mapping<2>::normal_directions[4]; template<> const unsigned int Mapping<3>::normal_directions[6]; - +#endif /* ------------------------- inline functions ------------------------- */ diff --git a/deal.II/deal.II/include/fe/mapping_q1.h b/deal.II/deal.II/include/fe/mapping_q1.h index 613d549fda..bbe2afd378 100644 --- a/deal.II/deal.II/include/fe/mapping_q1.h +++ b/deal.II/deal.II/include/fe/mapping_q1.h @@ -584,10 +584,13 @@ MappingQ1::InternalData::derivative (const unsigned int qpoint, /* -------------- declaration of explicit specializations ------------- */ +// 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 template<> const unsigned int MappingQ1<1>::vertex_mapping[2]; template<> const unsigned int MappingQ1<2>::vertex_mapping[4]; template<> const unsigned int MappingQ1<3>::vertex_mapping[8]; - +#endif template<> void MappingQ1<1>::compute_shapes_virtual ( const std::vector > &unit_points, InternalData& data) const;