]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Delete one unimplemented constructor. 4605/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Jul 2017 17:12:16 +0000 (11:12 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Jul 2017 17:12:16 +0000 (11:12 -0600)
While there, also let the compiler generate the default implementation
for copy constructors.

include/deal.II/base/symmetric_tensor.h

index 589fdcf2fc6d3706ff40cd98fadded8c03f5d42a..795dff13fbfa3496d5c2dd427fe494183bc87740 100644 (file)
@@ -312,9 +312,9 @@ namespace internal
                 const TableIndices<rank> &previous_indices);
 
       /**
-       * Copy constructor. Not needed, and invisible, so private.
+       * Copy constructor.
        */
-      Accessor (const Accessor &a);
+      Accessor (const Accessor &) = default;
 
     public:
 
@@ -395,14 +395,14 @@ namespace internal
                 const TableIndices<rank> &previous_indices);
 
       /**
-       * Default constructor. Not needed, and invisible, so private.
+       * Default constructor. Not needed, so deleted.
        */
-      Accessor ();
+      Accessor () = delete;
 
       /**
-       * Copy constructor. Not needed, and invisible, so private.
+       * Copy constructor.
        */
-      Accessor (const Accessor &a);
+      Accessor (const Accessor &) = default;
 
     public:
 
@@ -852,15 +852,6 @@ namespace internal
     {}
 
 
-    template <int rank, int dim, bool constness, int P, typename Number>
-    Accessor<rank,dim,constness,P,Number>::
-    Accessor (const Accessor &a)
-      :
-      tensor (a.tensor),
-      previous_indices (a.previous_indices)
-    {}
-
-
 
     template <int rank, int dim, bool constness, int P, typename Number>
     Accessor<rank,dim,constness,P-1,Number>
@@ -893,16 +884,6 @@ namespace internal
 
 
 
-    template <int rank, int dim, bool constness, typename Number>
-    Accessor<rank,dim,constness,1,Number>::
-    Accessor (const Accessor &a)
-      :
-      tensor (a.tensor),
-      previous_indices (a.previous_indices)
-    {}
-
-
-
     template <int rank, int dim, bool constness, typename Number>
     typename Accessor<rank,dim,constness,1,Number>::reference
     Accessor<rank,dim,constness,1,Number>::operator[] (const unsigned int i)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.