Skip to content

Commit 13b0136

Browse files
authored
Merge pull request #929 from duembgen/fix-ambiguous-reference
2 parents 3e5d375 + fe6eb43 commit 13b0136

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

gtsam/navigation/tests/testGPSFactor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ TEST( GPSFactor, Constructor ) {
7272

7373
// Calculate numerical derivatives
7474
Matrix expectedH = numericalDerivative11<Vector,Pose3>(
75-
std::bind(&GPSFactor::evaluateError, &factor, _1, boost::none), T);
75+
std::bind(&GPSFactor::evaluateError, &factor, std::placeholders::_1, boost::none), T);
7676

7777
// Use the factor to calculate the derivative
7878
Matrix actualH;
@@ -101,7 +101,7 @@ TEST( GPSFactor2, Constructor ) {
101101

102102
// Calculate numerical derivatives
103103
Matrix expectedH = numericalDerivative11<Vector,NavState>(
104-
std::bind(&GPSFactor2::evaluateError, &factor, _1, boost::none), T);
104+
std::bind(&GPSFactor2::evaluateError, &factor, std::placeholders::_1, boost::none), T);
105105

106106
// Use the factor to calculate the derivative
107107
Matrix actualH;

gtsam/navigation/tests/testMagFactor.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ TEST( MagFactor, unrotate ) {
6464
Point3 expected(22735.5, 314.502, 44202.5);
6565
EXPECT( assert_equal(expected, MagFactor::unrotate(theta,nM,H),1e-1));
6666
EXPECT( assert_equal(numericalDerivative11<Point3,Rot2> //
67-
(std::bind(&MagFactor::unrotate, _1, nM, none), theta), H, 1e-6));
67+
(std::bind(&MagFactor::unrotate, std::placeholders::_1, nM, none), theta), H, 1e-6));
6868
}
6969

7070
// *************************************************************************
@@ -76,35 +76,35 @@ TEST( MagFactor, Factors ) {
7676
MagFactor f(1, measured, s, dir, bias, model);
7777
EXPECT( assert_equal(Z_3x1,f.evaluateError(theta,H1),1e-5));
7878
EXPECT( assert_equal((Matrix)numericalDerivative11<Vector,Rot2> //
79-
(std::bind(&MagFactor::evaluateError, &f, _1, none), theta), H1, 1e-7));
79+
(std::bind(&MagFactor::evaluateError, &f, std::placeholders::_1, none), theta), H1, 1e-7));
8080

8181
// MagFactor1
8282
MagFactor1 f1(1, measured, s, dir, bias, model);
8383
EXPECT( assert_equal(Z_3x1,f1.evaluateError(nRb,H1),1e-5));
8484
EXPECT( assert_equal(numericalDerivative11<Vector,Rot3> //
85-
(std::bind(&MagFactor1::evaluateError, &f1, _1, none), nRb), H1, 1e-7));
85+
(std::bind(&MagFactor1::evaluateError, &f1, std::placeholders::_1, none), nRb), H1, 1e-7));
8686

8787
// MagFactor2
8888
MagFactor2 f2(1, 2, measured, nRb, model);
8989
EXPECT( assert_equal(Z_3x1,f2.evaluateError(scaled,bias,H1,H2),1e-5));
9090
EXPECT( assert_equal(numericalDerivative11<Vector,Point3> //
91-
(std::bind(&MagFactor2::evaluateError, &f2, _1, bias, none, none), scaled),//
91+
(std::bind(&MagFactor2::evaluateError, &f2, std::placeholders::_1, bias, none, none), scaled),//
9292
H1, 1e-7));
9393
EXPECT( assert_equal(numericalDerivative11<Vector,Point3> //
94-
(std::bind(&MagFactor2::evaluateError, &f2, scaled, _1, none, none), bias),//
94+
(std::bind(&MagFactor2::evaluateError, &f2, scaled, std::placeholders::_1, none, none), bias),//
9595
H2, 1e-7));
9696

9797
// MagFactor2
9898
MagFactor3 f3(1, 2, 3, measured, nRb, model);
9999
EXPECT(assert_equal(Z_3x1,f3.evaluateError(s,dir,bias,H1,H2,H3),1e-5));
100100
EXPECT(assert_equal((Matrix)numericalDerivative11<Vector,double> //
101-
(std::bind(&MagFactor3::evaluateError, &f3, _1, dir, bias, none, none, none), s),//
101+
(std::bind(&MagFactor3::evaluateError, &f3, std::placeholders::_1, dir, bias, none, none, none), s),//
102102
H1, 1e-7));
103103
EXPECT(assert_equal(numericalDerivative11<Vector,Unit3> //
104-
(std::bind(&MagFactor3::evaluateError, &f3, s, _1, bias, none, none, none), dir),//
104+
(std::bind(&MagFactor3::evaluateError, &f3, s, std::placeholders::_1, bias, none, none, none), dir),//
105105
H2, 1e-7));
106106
EXPECT(assert_equal(numericalDerivative11<Vector,Point3> //
107-
(std::bind(&MagFactor3::evaluateError, &f3, s, dir, _1, none, none, none), bias),//
107+
(std::bind(&MagFactor3::evaluateError, &f3, s, dir, std::placeholders::_1, none, none, none), bias),//
108108
H3, 1e-7));
109109
}
110110

0 commit comments

Comments
 (0)