Fix operator= ambiguity on some versions of Clang. - Earlier versions of Clang (up to at least v3.0) throw an ambiguous operator= error in this assignment. Variations on this error have cropped up occassionally in some other projects (e.g. PCL). Change-Id: I73a632c43528eb69840ce697c55d9afc5f3d8e59
diff --git a/include/ceres/dynamic_numeric_diff_cost_function.h b/include/ceres/dynamic_numeric_diff_cost_function.h index 9f70000..7216c8e 100644 --- a/include/ceres/dynamic_numeric_diff_cost_function.h +++ b/include/ceres/dynamic_numeric_diff_cost_function.h
@@ -203,7 +203,7 @@ // 1. Store residuals for the forward part. // 2. Subtract residuals for the backward (or 0) part. // 3. Divide out the run. - parameter_jacobian.col(j) = residuals; + parameter_jacobian.col(j).matrix() = residuals; double one_over_h = 1 / step_size(j); if (method == CENTRAL) {