From 57061db3426ead410e6bd878df7530f1bfbe2642 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 9 Jan 2002 08:15:14 +0000 Subject: [PATCH] Work around a bug in Compaq's cxx compiler. git-svn-id: https://svn.dealii.org/trunk@5365 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-12/step-12.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/deal.II/examples/step-12/step-12.cc b/deal.II/examples/step-12/step-12.cc index 0695675e26..1686baaa51 100644 --- a/deal.II/examples/step-12/step-12.cc +++ b/deal.II/examples/step-12/step-12.cc @@ -116,10 +116,19 @@ class BoundaryValues: public Function // ``Tensor'', simplifying terms like // $\beta\cdot n$ and // $\beta\cdot\nabla v$. + // + // An unnecessary empty constructor + // is added to the class to work + // around a bug in Compaq's cxx + // compiler which otherwise reports + // an error about an omitted + // initializer for an object of + // this class further down. template class Beta { public: + Beta () {}; void value_list (const std::vector > &points, std::vector > &values) const; }; @@ -161,9 +170,9 @@ void Beta::value_list(const std::vector > &points, const Point &p=points[i]; Point &beta=values[i]; - beta(0)=-p(1); - beta(1)=p(0); - beta/=sqrt(beta.square()); + beta(0) = -p(1); + beta(1) = p(0); + beta /= std::sqrt(beta.square()); } } -- 2.39.5