]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MSVC fix for fe_evaluation 1920/head
authorTimo Heister <timo.heister@gmail.com>
Sat, 28 Nov 2015 13:30:15 +0000 (08:30 -0500)
committerTimo Heister <timo.heister@gmail.com>
Sat, 28 Nov 2015 13:30:15 +0000 (08:30 -0500)
It looks like MSVC struggles with operator? in template parameters unless you wrap them in parenthesis.

include/deal.II/matrix_free/fe_evaluation.h

index fa52f5e670dc984f9642eb11bbe1e06e838a5fd0..9a70083aa95beb1e97050463994569187b26c90c 100644 (file)
@@ -4098,13 +4098,13 @@ FEEvaluationAccess<dim,dim,Number>
 
 template <int dim, typename Number>
 inline
-Tensor<1,dim==2?1:dim,VectorizedArray<Number> >
+Tensor<1,(dim==2?1:dim),VectorizedArray<Number> >
 FEEvaluationAccess<dim,dim,Number>
 ::get_curl (const unsigned int q_point) const
 {
   // copy from generic function into dim-specialization function
   const Tensor<2,dim,VectorizedArray<Number> > grad = get_gradient(q_point);
-  Tensor<1,dim==2?1:dim,VectorizedArray<Number> > curl;
+  Tensor<1,(dim==2?1:dim),VectorizedArray<Number> > curl;
   switch (dim)
     {
     case 1:

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.