From 07df58d48473bd86e8a129c98b9e88dc52d776e1 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 6 Mar 2007 20:57:33 +0000 Subject: [PATCH] Allow using the copy constructor of FiniteElement. git-svn-id: https://svn.dealii.org/trunk@14535 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe.h | 31 +++++++++---------------------- deal.II/deal.II/source/fe/fe.cc | 15 --------------- 2 files changed, 9 insertions(+), 37 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index 11ba6bdb10..c132c4f7b1 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -378,22 +378,6 @@ class FiniteElement : public Subscriptor, }; public: - /** - * Copy constructor. This one is declared - * as a public constructor to avoid - * certain compiler errors when a copy - * constructor is required even if it is - * not executed (for example when binding - * a temporary object to a constant - * reference). However, if you try to - * actually call it, it will throw an - * exception, since copying finite - * element objects is not really - * supported. If you want to copy such an - * object, use the @p clone function. - */ - FiniteElement (const FiniteElement &); - /** * Constructor */ @@ -2128,12 +2112,15 @@ class FiniteElement : public Subscriptor, virtual UpdateFlags update_each (const UpdateFlags flags) const = 0; /** - * @p clone function instead of - * a copy constructor. - * - * This function is needed by the - * constructors of FESystem as well - * as by the hp::FECollection class. + * A sort of virtual copy + * constructor. Some places in + * the library, for example the + * constructors of FESystem as + * well as the hp::FECollection + * class, need to make copied of + * finite elements without + * knowing their exact type. They + * do so through this function. */ virtual FiniteElement *clone() const = 0; diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index a1b0d8e4f3..6def406a71 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -212,21 +212,6 @@ FiniteElement::FiniteElement ( } -template -FiniteElement::FiniteElement (const FiniteElement &) - : - Subscriptor(), - FiniteElementData(), - cached_primitivity (false) -{ - Assert (false, - ExcMessage ("Finite element objects don't support copying " - "semantics through the copy constructor. If " - "you want to copy a finite element, use the " - "clone() function.")); -} - - template FiniteElement::~FiniteElement () -- 2.39.5