]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not repeat template default arguments 844/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 20 Apr 2015 06:58:01 +0000 (08:58 +0200)
committerMatthias Maier <tamiko@43-1.org>
Mon, 20 Apr 2015 07:30:45 +0000 (09:30 +0200)
This is indeed not valid C++11 and clang is unhappy about that.

Further, it works around a regression in gcc up to 4.7 that ejects a bogus
error in the lambda definitions in case of partial template default
arguments [1]

Closes #842

[1] https://github.com/dealii/dealii/pull/843

include/deal.II/lac/linear_operator.h

index 7ee7bcda82a6ac1c964b2a5f13c482bd155197bd..18fe51f05a009a62ff335e10c19df4c56124103a 100644 (file)
@@ -1144,9 +1144,7 @@ namespace
  *
  * @ingroup LAOperators
  */
-template <typename Range = Vector<double>,
-          typename Domain = Range,
-          typename Matrix>
+template <typename Range, typename Domain, typename Matrix>
 LinearOperator<Range, Domain> linear_operator(const Matrix &matrix)
 {
   // implement with the more generic variant below...
@@ -1171,13 +1169,12 @@ LinearOperator<Range, Domain> linear_operator(const Matrix &matrix)
  *
  * @ingroup LAOperators
  */
-template <typename Range = Vector<double>,
-          typename Domain = Range,
+template <typename Range,
+          typename Domain,
           typename OperatorExemplar,
           typename Matrix>
 LinearOperator<Range, Domain>
-linear_operator(const OperatorExemplar &operator_exemplar,
-                const Matrix &matrix)
+linear_operator(const OperatorExemplar &operator_exemplar, const Matrix &matrix)
 {
   LinearOperator<Range, Domain> return_op;
 

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.