From 5fda355fca748752f935b461e27a57a71b4ffe6d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 12 Jul 2017 10:11:39 -0600 Subject: [PATCH] Delete the constructor of p::d::Triangulation when no p4est is available. --- include/deal.II/distributed/tria.h | 13 +++++++------ source/distributed/tria.cc | 16 ---------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index 886a65ce47..de8a9ec736 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -1029,18 +1029,19 @@ namespace parallel * parallel::distributed::Triangulation objects throughout the library * even if it is disabled. * - * Since the constructor of this class is private, no such objects can - * actually be created if we don't have p4est available. + * Since the constructor of this class is deleted, no such objects + * can actually be created as this would be pointless given that + * p4est is not available. */ template class Triangulation : public dealii::parallel::Triangulation { - private: + public: /** - * Constructor. + * Constructor. Deleted to make sure that objects of this type cannot be + * constructed (see also the class documentation). */ - Triangulation (); - + Triangulation () = delete; }; } } diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 5aa1a4107f..f67891a4a0 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3932,22 +3932,6 @@ namespace parallel } -#else // DEAL_II_WITH_P4EST - -namespace parallel -{ - namespace distributed - { - template - Triangulation::Triangulation () - : - dealii::parallel::Triangulation(MPI_COMM_SELF) - { - Assert (false, ExcNotImplemented()); - } - } -} - #endif // DEAL_II_WITH_P4EST -- 2.39.5