Removed pairs containing references because this doesn't work with some compilers
parent
46beb6c6a4
commit
04dc21d9ec
|
|
@ -79,7 +79,7 @@ namespace gtsam {
|
|||
: keys(keys), Ab(Ab), i(i) {}
|
||||
|
||||
template<class MATRIX>
|
||||
void operator()(const std::pair<Key, const MATRIX&>& term) const
|
||||
void operator()(const std::pair<Key, MATRIX>& term) const
|
||||
{
|
||||
// Check block rows
|
||||
if(term.second.rows() != Ab.rows())
|
||||
|
|
@ -91,18 +91,6 @@ namespace gtsam {
|
|||
++ i;
|
||||
}
|
||||
|
||||
template<class MATRIX>
|
||||
void operator()(const std::pair<int, const MATRIX&>& term) const
|
||||
{
|
||||
operator()(std::pair<Key, const MATRIX&>(term));
|
||||
}
|
||||
|
||||
template<class MATRIX>
|
||||
void operator()(const std::pair<Key, MATRIX>& term) const
|
||||
{
|
||||
operator()(std::pair<Key, const MATRIX&>(term));
|
||||
}
|
||||
|
||||
template<class MATRIX>
|
||||
void operator()(const std::pair<int, MATRIX>& term) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,14 +175,14 @@ namespace gtsam {
|
|||
* @param value The vector to be inserted.
|
||||
* @param j The index with which the value will be associated. */
|
||||
void insert(Key j, const Vector& value) {
|
||||
insert(std::pair<Key, const Vector&>(j, value)); // Note only passing a reference to the Vector
|
||||
insert(std::make_pair(j, value)); // Note only passing a reference to the Vector
|
||||
}
|
||||
|
||||
/** Insert a vector \c value with key \c j. Throws an invalid_argument exception if the key \c
|
||||
* j is already used.
|
||||
* @param value The vector to be inserted.
|
||||
* @param j The index with which the value will be associated. */
|
||||
void insert(std::pair<Key, const Vector&> key_value) {
|
||||
void insert(const std::pair<Key, Vector>& key_value) {
|
||||
// Note that here we accept a pair with a reference to the Vector, but the Vector is copied as
|
||||
// it is inserted into the values_ map.
|
||||
if(!values_.insert(key_value).second)
|
||||
|
|
|
|||
Loading…
Reference in New Issue