Could not use local class for KeyFormatter when passing to boost function on some compilers

release/4.3a0
Richard Roberts 2012-06-25 12:09:42 +00:00
parent b16fe4f7fc
commit 2c088b6a72
2 changed files with 14 additions and 14 deletions

View File

@ -34,7 +34,6 @@
#include <gtsam/inference/BayesTreeCliqueBase.h>
#include <gtsam/inference/IndexConditional.h>
#include <gtsam/linear/VectorValues.h>
#include <gtsam/nonlinear/Key.h>
namespace gtsam {

View File

@ -29,11 +29,10 @@ using namespace std;
namespace gtsam {
/* ************************************************************************* */
void NonlinearISAM::saveGraph(const string& s, const KeyFormatter& keyFormatter) const {
/* ************************************************************************* */
// Create an index formatter that looks up the Key in an inverse ordering, then
// formats the key using the provided key formatter.
// formats the key using the provided key formatter, used in saveGraph.
struct OrderingIndexFormatter {
Ordering::InvertedMap inverseOrdering;
const KeyFormatter& keyFormatter;
@ -44,6 +43,8 @@ void NonlinearISAM::saveGraph(const string& s, const KeyFormatter& keyFormatter)
}
};
/* ************************************************************************* */
void NonlinearISAM::saveGraph(const string& s, const KeyFormatter& keyFormatter) const {
isam_.saveGraph(s, OrderingIndexFormatter(ordering_, keyFormatter));
}