From 2fad4123aab6a546ea091c28c0b70c006736182c Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Wed, 12 Jul 2017 10:32:52 -0600
Subject: [PATCH] Delete the copy constructor of class Triangulation.

---
 include/deal.II/grid/tria.h |  6 +++---
 source/grid/tria.cc         | 19 -------------------
 2 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h
index 80d8cbf20e..fc26bb647f 100644
--- a/include/deal.II/grid/tria.h
+++ b/include/deal.II/grid/tria.h
@@ -1581,8 +1581,8 @@ public:
   /**
    * Copy constructor.
    *
-   * You should really use the @p copy_triangulation function, so we declare
-   * this function but let it throw an internal error. The reason for this is
+   * You should really use the @p copy_triangulation function, so this
+   * constructor is deleted. The reason for this is
    * that we may want to use triangulation objects in collections. However,
    * C++ containers require that the objects stored in them are copyable, so
    * we need to provide a copy constructor. On the other hand, copying
@@ -1593,7 +1593,7 @@ public:
    * Finally, through the exception, one easily finds the places where code
    * has to be changed to avoid copies.
    */
-  Triangulation (const Triangulation<dim, spacedim> &t);
+  Triangulation (const Triangulation<dim, spacedim> &) = delete;
 
   /**
    * Move constructor.
diff --git a/source/grid/tria.cc b/source/grid/tria.cc
index 9b22a89875..cbd78a0b96 100644
--- a/source/grid/tria.cc
+++ b/source/grid/tria.cc
@@ -8968,25 +8968,6 @@ Triangulation (const MeshSmoothing smooth_grid,
 }
 
 
-template <int dim, int spacedim>
-Triangulation<dim, spacedim>::
-Triangulation (const Triangulation<dim, spacedim> &other)
-// do not set any subscriptors;
-// anyway, calling this constructor
-// is an error!
-  :
-  Subscriptor(),
-  signals (),
-  anisotropic_refinement(false),
-  check_for_distorted_cells(other.check_for_distorted_cells)
-{
-  Assert (false, ExcMessage ("You are not allowed to call this constructor "
-                             "because copying Triangulation objects is not "
-                             "allowed. Use Triangulation::copy_triangulation() "
-                             "instead."));
-}
-
-
 
 template <int dim, int spacedim>
 Triangulation<dim, spacedim>::
-- 
2.39.5