Browse Source

bind issues

Former-commit-id: 49e0d7e4732e1ab54b0d71c21f8a7e000be961d0
Alec Jacobson 10 years ago
parent
commit
c4e64414b6
1 changed files with 9 additions and 6 deletions
  1. 9 6
      include/igl/cgal/SelfIntersectMesh.h

+ 9 - 6
include/igl/cgal/SelfIntersectMesh.h

@@ -212,7 +212,7 @@ namespace igl
       // Getters:
       // Getters:
     public:
     public:
       //const IndexList& get_lIF() const{ return lIF;}
       //const IndexList& get_lIF() const{ return lIF;}
-      static inline void box_intersect(
+      static inline void box_intersect_static(
         SelfIntersectMesh * SIM, 
         SelfIntersectMesh * SIM, 
         const Box &a, 
         const Box &a, 
         const Box &b);
         const Box &b);
@@ -227,9 +227,8 @@ namespace igl
 #include <igl/get_seconds.h>
 #include <igl/get_seconds.h>
 #include <igl/C_STR.h>
 #include <igl/C_STR.h>
 
 
-#include <boost/function.hpp>
-#include <boost/bind.hpp>
 
 
+#include <functional>
 #include <algorithm>
 #include <algorithm>
 #include <exception>
 #include <exception>
 #include <cassert>
 #include <cassert>
@@ -277,7 +276,7 @@ inline void igl::SelfIntersectMesh<
   DerivedFF,
   DerivedFF,
   DerivedIF,
   DerivedIF,
   DerivedJ,
   DerivedJ,
-  DerivedIM>::box_intersect(
+  DerivedIM>::box_intersect_static(
   Self * SIM, 
   Self * SIM, 
   const typename Self::Box &a, 
   const typename Self::Box &a, 
   const typename Self::Box &b)
   const typename Self::Box &b)
@@ -350,8 +349,12 @@ inline igl::SelfIntersectMesh<
     boxes.push_back(Box(tit->bbox(), tit));
     boxes.push_back(Box(tit->bbox(), tit));
   }
   }
   // Leapfrog callback
   // Leapfrog callback
-  boost::function<void(const Box &a,const Box &b)> cb
-    = boost::bind(&box_intersect, this, _1,_2);
+  std::function<void(const Box &a,const Box &b)> cb = 
+    std::bind(&box_intersect_static, this, 
+      // Explicitly use std namespace to avoid confusion with boost (who puts
+      // _1 etc. in global namespace)
+      std::placeholders::_1,
+      std::placeholders::_2);
   //cout<<"boxes and bind: "<<tictoc()<<endl;
   //cout<<"boxes and bind: "<<tictoc()<<endl;
   // Run the self intersection algorithm with all defaults
   // Run the self intersection algorithm with all defaults
   try{
   try{