From: wolf Date: Mon, 29 Jul 2002 10:35:39 +0000 (+0000) Subject: Work around a bug in icc's handling of addresses of function templates. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eee2126f79d6fc65963714e7f46bbad2359b13d;p=dealii-svn.git Work around a bug in icc's handling of addresses of function templates. git-svn-id: https://svn.dealii.org/trunk@6302 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_tools.cc b/deal.II/deal.II/source/grid/grid_tools.cc index d6c5df3580..4252a2b8d8 100644 --- a/deal.II/deal.II/source/grid/grid_tools.cc +++ b/deal.II/deal.II/source/grid/grid_tools.cc @@ -133,8 +133,14 @@ void GridTools::shift (const Point &shift_vector, Triangulation &triangulation) { - transform (std::bind2nd(std::ptr_fun(&shift_point), - shift_vector), + // use a temporary variable to work + // around a bug in icc, which does + // not like it if we take the + // address of the function right + // within the call to std::ptr_fun + Point (*p) (const Point, const Point) + = &shift_point; + transform (std::bind2nd(std::ptr_fun(p), shift_vector), triangulation); }; @@ -160,8 +166,14 @@ GridTools::scale (const double scaling_factor, { Assert (scaling_factor>0, ExcScalingFactorNotPositive (scaling_factor)); - transform (std::bind2nd(std::ptr_fun(&scale_point), - scaling_factor), + // use a temporary variable to work + // around a bug in icc, which does + // not like it if we take the + // address of the function right + // within the call to std::ptr_fun + Point (*p) (const Point, const double) + = &scale_point; + transform (std::bind2nd(std::ptr_fun(p), scaling_factor), triangulation); };