Added a liberal sprinkling of 'typename' to make TupleConfig work better
parent
a66a405dd5
commit
94d50ddfb9
|
@ -193,12 +193,12 @@ namespace gtsam {
|
|||
bool exists(const Key1& j) const { return first_.exists(j); }
|
||||
|
||||
// access operator - currently configs after the first one will not be found
|
||||
template<class Key, class Value>
|
||||
const Value& operator[](const Key& j) const { return second_[j]; }
|
||||
template<class Key>
|
||||
const typename Key::Value_t & operator[](const Key& j) const { return second_[j]; }
|
||||
const Value1& operator[](const Key1& j) const { return first_[j]; }
|
||||
|
||||
template<class Key, class Value>
|
||||
const Value& at(const Key& j) const { return second_.at(j); }
|
||||
template<class Key>
|
||||
const typename Key::Value_t & at(const Key& j) const { return second_.at(j); }
|
||||
const Value1& at(const Key1& j) const { return first_.at(j); }
|
||||
|
||||
};
|
||||
|
|
|
@ -203,12 +203,12 @@ TEST(TupleConfig, create_insert) {
|
|||
configB.insert(l1, point1);
|
||||
configB.insert(L1, lam1);
|
||||
|
||||
// bracket operator - FAILS on config types after first one
|
||||
// bracket operator
|
||||
CHECK(assert_equal(configA[x1], pose1));
|
||||
// CHECK(assert_equal(configA[l1], point1));
|
||||
CHECK(assert_equal(configA[l1], point1));
|
||||
CHECK(assert_equal(configB[x1], pose1));
|
||||
// CHECK(assert_equal(configB[l1], point1));
|
||||
// CHECK(assert_equal(configB[L1], lam1));
|
||||
CHECK(assert_equal(configB[l1], point1));
|
||||
CHECK(assert_equal(configB[L1], lam1));
|
||||
|
||||
// exists
|
||||
CHECK(configA.exists(x1));
|
||||
|
@ -217,12 +217,12 @@ TEST(TupleConfig, create_insert) {
|
|||
CHECK(configB.exists(l1));
|
||||
CHECK(configB.exists(L1));
|
||||
|
||||
// at - access function - FAILS as with bracket operator
|
||||
// at
|
||||
CHECK(assert_equal(configA.at(x1), pose1));
|
||||
// CHECK(assert_equal(configA.at(l1), point1));
|
||||
CHECK(assert_equal(configA.at(l1), point1));
|
||||
CHECK(assert_equal(configB.at(x1), pose1));
|
||||
// CHECK(assert_equal(configB.at(l1), point1));
|
||||
// CHECK(assert_equal(configB.at(L1), lam1));
|
||||
CHECK(assert_equal(configB.at(l1), point1));
|
||||
CHECK(assert_equal(configB.at(L1), lam1));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue