+// Declare the existence of explicit instantiations of the class
+// above. This is not strictly necessary, but tells the compiler to
+// avoid instantiating templates that we know are instantiated in
+// .cc files and so can be referenced without implicit
+// instantiations.
+//
+// Unfortunately, this does not seem to work when building modules
+// because the compiler (well, Clang at least) then just doesn't
+// instantiate these classes at all, even though their members are
+// defined and explicitly instantiated in a .cc file.
+# ifndef DEAL_II_BUILDING_CXX20_MODULE
extern template class DoFHandler<1, 1>;
extern template class DoFHandler<1, 2>;
extern template class DoFHandler<1, 3>;
extern template class DoFHandler<2, 2>;
extern template class DoFHandler<2, 3>;
extern template class DoFHandler<3, 3>;
-
+# endif
#endif // DOXYGEN
Triangulation<1, 3>::prepare_coarsening_and_refinement();
+// Declare the existence of explicit instantiations of the class
+// above. This is not strictly necessary, but tells the compiler to
+// avoid instantiating templates that we know are instantiated in
+// .cc files and so can be referenced without implicit
+// instantiations.
+//
+// Unfortunately, this does not seem to work when building modules
+// because the compiler (well, Clang at least) then just doesn't
+// instantiate these classes at all, even though their members are
+// defined and explicitly instantiated in a .cc file.
+# ifndef DEAL_II_BUILDING_CXX20_MODULE
extern template class Triangulation<1, 1>;
extern template class Triangulation<1, 2>;
extern template class Triangulation<1, 3>;
extern template class Triangulation<2, 2>;
extern template class Triangulation<2, 3>;
extern template class Triangulation<3, 3>;
+# endif
#endif // DOXYGEN
#ifndef DOXYGEN
- // Declare the existence of explicit instantiations of the class
- // above to avoid certain warnings issues by clang and
- // newer (LLVM-based) Intel compilers:
+// Declare the existence of explicit instantiations of the class
+// above. This is not strictly necessary, but tells the compiler to
+// avoid instantiating templates that we know are instantiated in
+// .cc files and so can be referenced without implicit
+// instantiations. In the current case, this also avoids certain
+// warnings issues by clang and newer (LLVM-based) Intel compilers.
+//
+// Unfortunately, this does not seem to work when building modules
+// because the compiler (well, Clang at least) then just doesn't
+// instantiate these classes at all, even though their members are
+// defined and explicitly instantiated in a .cc file.
+# ifndef DEAL_II_BUILDING_CXX20_MODULE
extern template struct StaticMappingQ1<1, 1>;
extern template struct StaticMappingQ1<1, 2>;
extern template struct StaticMappingQ1<1, 3>;
extern template struct StaticMappingQ1<2, 3>;
extern template struct StaticMappingQ1<3, 3>;
-# ifndef _MSC_VER
+# ifndef _MSC_VER
extern template MappingCollection<1, 1>
StaticMappingQ1<1, 1>::mapping_collection;
extern template MappingCollection<1, 2>
StaticMappingQ1<2, 3>::mapping_collection;
extern template MappingCollection<3, 3>
StaticMappingQ1<3, 3>::mapping_collection;
+# endif
# endif
#endif