From 2e205adcc866576c610b77e477eeb11c9ded1626 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 20 Oct 2005 22:42:02 +0000 Subject: [PATCH] move instantiations to correct place git-svn-id: https://svn.dealii.org/trunk@11642 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/tria_accessor.cc | 46 ++++++++++---------- deal.II/lac/source/block_sparsity_pattern.cc | 39 +++++++++-------- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 96bfc5c167..d5b62abf5a 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -24,29 +24,6 @@ #include -// Remark: The following explicit instantiations needed to be moved to -// this place here to work around a problem with gcc3.3 on Apple MacOSX. -// The reason is that some of the functions instantiated here are used -// further down; if they are not explicitly instantiated here, then the -// compiler will do an implicit instantiation and give it internal linkage -// (despite the later explicit instantiation that should make sure it -// gets external linkage). To make sure the functions have external -// linkage, we need to place the explicit instantiation before the first -// use. -// -// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331 -// +++++++++++++ - - -template class TriaObjectAccessor<1, deal_II_dimension>; - -#if deal_II_dimension >= 2 -template class TriaObjectAccessor<2, deal_II_dimension>; -#endif - -#if deal_II_dimension >= 3 -template class TriaObjectAccessor<3, deal_II_dimension>; -#endif /*------------------------ Functions: LineAccessor ---------------------------*/ @@ -1627,6 +1604,29 @@ set_face_orientation (const unsigned int face, } +// Remark: The following explicit instantiations needed to be moved to +// this place here to work around a problem with gcc3.3 on Apple MacOSX. +// The reason is that some of the functions instantiated here are used +// further down; if they are not explicitly instantiated here, then the +// compiler will do an implicit instantiation and give it internal linkage +// (despite the later explicit instantiation that should make sure it +// gets external linkage). To make sure the functions have external +// linkage, we need to place the explicit instantiation before the first +// use. +// +// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331 + +template class TriaObjectAccessor<1, deal_II_dimension>; + +#if deal_II_dimension >= 2 +template class TriaObjectAccessor<2, deal_II_dimension>; +#endif + +#if deal_II_dimension >= 3 +template class TriaObjectAccessor<3, deal_II_dimension>; +#endif + + /*------------------------ Functions: CellAccessor<1> -----------------------*/ diff --git a/deal.II/lac/source/block_sparsity_pattern.cc b/deal.II/lac/source/block_sparsity_pattern.cc index 7fb3c57a50..31fd7dff6b 100644 --- a/deal.II/lac/source/block_sparsity_pattern.cc +++ b/deal.II/lac/source/block_sparsity_pattern.cc @@ -15,24 +15,6 @@ #include -// Remark: The following explicit instantiations needed to be moved to -// this place here to work around a problem with gcc3.3 on Apple MacOSX. -// The reason is that some of the functions instantiated here are used -// further down; if they are not explicitly instantiated here, then the -// compiler will do an implicit instantiation and give it internal linkage -// (despite the later explicit instantiation that should make sure it -// gets external linkage). To make sure the functions have external -// linkage, we need to place the explicit instantiation before the first -// use. -// -// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331 -// +++++++++++++ - - -template class BlockSparsityPatternBase; -template class BlockSparsityPatternBase; - - template BlockSparsityPatternBase::BlockSparsityPatternBase () : @@ -281,6 +263,27 @@ BlockSparsityPatternBase::print(std::ostream& out) const } + +// Remark: The following explicit instantiations needed to be moved to +// this place here to work around a problem with gcc3.3 on Apple MacOSX. +// The reason is that some of the functions instantiated here are used +// further down; if they are not explicitly instantiated here, then the +// compiler will do an implicit instantiation and give it internal linkage +// (despite the later explicit instantiation that should make sure it +// gets external linkage). To make sure the functions have external +// linkage, we need to place the explicit instantiation before the first +// use. +// +// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331 +// +++++++++++++ + + +template class BlockSparsityPatternBase; +template class BlockSparsityPatternBase; + + + + BlockSparsityPattern::BlockSparsityPattern () {} -- 2.39.5