]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a bug in icc's handling of addresses of function templates.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 29 Jul 2002 10:35:39 +0000 (10:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 29 Jul 2002 10:35:39 +0000 (10:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@6302 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_tools.cc

index d6c5df35808c79bc4849ecae35b20fe2dbceca5f..4252a2b8d832a80859a8d34e0ec62005c42db8d9 100644 (file)
@@ -133,8 +133,14 @@ void
 GridTools::shift (const Point<dim>   &shift_vector,
                  Triangulation<dim> &triangulation)
 {
-  transform (std::bind2nd(std::ptr_fun(&shift_point<dim>),
-                         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<dim> (*p) (const Point<dim>, const Point<dim>)
+    = &shift_point<dim>;
+  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<dim>),
-                         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<dim> (*p) (const Point<dim>, const double)
+    = &scale_point<dim>;
+  transform (std::bind2nd(std::ptr_fun(p), scaling_factor),
             triangulation);
 };
 

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.