Commit 22a01e1f authored by Mike Kremer's avatar Mike Kremer

Added functional header to include tr1 functional include plus namespace wrapper.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@172 66977474-1d4b-4f09-8fe9-267525286df2
parent 8b676f7b
......@@ -40,7 +40,7 @@
* *
\*===========================================================================*/
#include <tr1/functional>
#include <OpenVolumeMesh/System/FunctionalInclude.hh>
#include <queue>
#include "TopologyKernel.hh"
......@@ -614,7 +614,7 @@ EdgeIter TopologyKernel::delete_edge(const EdgeHandle& _h) {
hes.erase(std::remove(hes.begin(), hes.end(), halfedge_handle(_h, 1)), hes.end());
std::for_each(hes.begin(), hes.end(),
std::tr1::bind(&HEHandleCorrection::correctValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HEHandleCorrection::correctValue, &cor, fun::placeholders::_1));
face(*f_it).set_halfedges(hes);
}
} else {
......@@ -638,7 +638,7 @@ EdgeIter TopologyKernel::delete_edge(const EdgeHandle& _h) {
// Decrease all half-edge handles greater than _h in face
HEHandleCorrection cor(halfedge_handle(_h, 1));
std::for_each(hes.begin(), hes.end(),
std::tr1::bind(&HEHandleCorrection::correctValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HEHandleCorrection::correctValue, &cor, fun::placeholders::_1));
face(*f_it).set_halfedges(hes);
}
}
......@@ -655,7 +655,7 @@ EdgeIter TopologyKernel::delete_edge(const EdgeHandle& _h) {
HEHandleCorrection cor(halfedge_handle(_h, 1));
std::for_each(outgoing_hes_per_vertex_.begin(),
outgoing_hes_per_vertex_.end(),
std::tr1::bind(&HEHandleCorrection::correctVecValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HEHandleCorrection::correctVecValue, &cor, fun::placeholders::_1));
}
// 5)
......@@ -755,7 +755,7 @@ FaceIter TopologyKernel::delete_face(const FaceHandle& _h) {
HFHandleCorrection cor(halfface_handle(_h, 1));
std::for_each(hfs.begin(), hfs.end(),
std::tr1::bind(&HFHandleCorrection::correctValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HFHandleCorrection::correctValue, &cor, fun::placeholders::_1));
cell(*c_it).set_halffaces(hfs);
}
......@@ -777,7 +777,7 @@ FaceIter TopologyKernel::delete_face(const FaceHandle& _h) {
HFHandleCorrection cor(halfface_handle(_h, 1));
std::for_each(hfs.begin(), hfs.end(),
std::tr1::bind(&HFHandleCorrection::correctValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HFHandleCorrection::correctValue, &cor, fun::placeholders::_1));
cell(*c_it).set_halffaces(hfs);
}
}
......@@ -794,7 +794,7 @@ FaceIter TopologyKernel::delete_face(const FaceHandle& _h) {
HFHandleCorrection cor(halfface_handle(_h, 1));
std::for_each(incident_hfs_per_he_.begin(),
incident_hfs_per_he_.end(),
std::tr1::bind(&HFHandleCorrection::correctVecValue, &cor, std::tr1::placeholders::_1));
fun::bind(&HFHandleCorrection::correctVecValue, &cor, fun::placeholders::_1));
}
// 5)
......@@ -850,7 +850,7 @@ CellIter TopologyKernel::delete_cell(const CellHandle& _h) {
CHandleCorrection cor(_h);
std::for_each(incident_cell_per_hf_.begin(),
incident_cell_per_hf_.end(),
std::tr1::bind(&CHandleCorrection::correctValue, &cor, std::tr1::placeholders::_1));
fun::bind(&CHandleCorrection::correctValue, &cor, fun::placeholders::_1));
}
// 3)
......
/*===========================================================================*\
* *
* OpenVolumeMesh *
* Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen *
* www.openvolumemesh.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenVolumeMesh. *
* *
* OpenVolumeMesh is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version with the *
* following exceptions: *
* *
* If other files instantiate templates or use macros *
* or inline functions from this file, or you compile this file and *
* link it with other files to produce an executable, this file does *
* not by itself cause the resulting executable to be covered by the *
* GNU Lesser General Public License. This exception does not however *
* invalidate any other reasons why the executable file might be *
* covered by the GNU Lesser General Public License. *
* *
* OpenVolumeMesh is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU LesserGeneral Public *
* License along with OpenVolumeMesh. If not, *
* see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision: 36 $ *
* $Date: 2012-01-10 18:00:06 +0100 (Di, 10 Jan 2012) $ *
* $LastChangedBy: kremer $ *
* *
\*===========================================================================*/
#ifndef FUNCTIONALINCLUDE_HH_
#define FUNCTIONALINCLUDE_HH_
#if (__cplusplus >= 201103L)
// C++11:
#include <functional>
namespace fun = std;
#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
// C++11 via -std=c++0x on gcc:
#include <functional>
namespace fun = std;
#else
// C++98 and TR1:
#if (_MSC_VER >= 1600)
// VStudio 2010 supports some C++11 features
#include <functional>
namespace fun = std;
#elif (_MSC_VER >= 1500)
// hope for TR1 equivalents
#if(_HAS_TR1)
#include <functional>
namespace fun = std::tr1;
#else
#pragma warning "TR1 not available! Please install Visual Studio Service Pack 1!"
#endif
#else
// hope for TR1 equivalents
#include <tr1/functional>
namespace fun = std::tr1;
#endif
#endif
#endif /* FUNCTIONALINCLUDE_HH_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment