]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a conflict between the two fill() functions. Since the type of the
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 13 Feb 2006 00:35:02 +0000 (00:35 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 13 Feb 2006 00:35:02 +0000 (00:35 +0000)
single value has to be convertible to the type of the table elements anyway,
there is no point in not asking that it be correct already when passed to the
function.

git-svn-id: https://svn.dealii.org/trunk@12344 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/table.h

index f208761e3403e7664ad355d90fe5f207ed005c2f..13909f92eeffaf8b1edfecbcb0f8cbcc7e03bdb7 100644 (file)
@@ -615,12 +615,9 @@ class TableBase : public Subscriptor
 
                                     /**
                                      * Fill all table entries with
-                                     * the same value. The type of
-                                     * value must be convertible to t
-                                     * he value type of the table.
+                                     * the same value.
                                      */
-    template<typename T2>
-    void fill (const T2& value);
+    void fill (const T& value);
     
                                      /**
                                       * Return a read-write reference
@@ -1846,13 +1843,14 @@ TableBase<N,T>::reset_values ()
 }
 
 
+
 template <int N, typename T>
-template <typename T2>
+inline
 void
-TableBase<N,T>::fill (const T2& value)
+TableBase<N,T>::fill (const T& value)
 {
   if (n_elements() != 0)
-    std::fill_n(val, n_elements(), value);
+    std::fill_n (val, n_elements(), value);
 }
 
 

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.