@@ -34,20 +34,14 @@ namespace gtsam {
3434 }
3535
3636 /* ************************************************************************* */
37- template <typename KEYS >
38- JacobianFactor::JacobianFactor (const KEYS & keys,
39- const VerticalBlockMatrix& augmentedMatrix,
37+ template <typename KEYS , typename MATRIX ,
38+ typename = typename std::enable_if<std::is_same<
39+ std::decay_t <MATRIX >, VerticalBlockMatrix>::value>::type>
40+ JacobianFactor::JacobianFactor (KEYS && keys, MATRIX && augmentedMatrix,
4041 const SharedDiagonal& model)
41- : Base(keys), Ab_(augmentedMatrix), model_(model) {
42- checkAb (model, augmentedMatrix);
43- }
44-
45- /* ************************************************************************* */
46- template <typename KEYS >
47- JacobianFactor::JacobianFactor (const KEYS & keys,
48- VerticalBlockMatrix&& augmentedMatrix,
49- const SharedDiagonal& model)
50- : Base(keys), Ab_(std::move(augmentedMatrix)), model_(model) {
42+ : Base(std::forward<KEYS >(keys)),
43+ Ab_ (std::forward<MATRIX >(augmentedMatrix)),
44+ model_(model) {
5145 checkAb (model, Ab_);
5246 }
5347
0 commit comments