From: wolf Date: Wed, 9 Jan 2002 08:15:14 +0000 (+0000) Subject: Work around a bug in Compaq's cxx compiler. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57061db3426ead410e6bd878df7530f1bfbe2642;p=dealii-svn.git Work around a bug in Compaq's cxx compiler. git-svn-id: https://svn.dealii.org/trunk@5365 0785d39b-7218-0410-832d-ea1e28bc413d --- 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()); } }