Provide DynamicAutoDiffCostFunction deduction guide

The deduction guide allows to avoid repeating the CostFunctor type.

Change-Id: I2285de37071006a97f89988baa9b7054d82dae86
This commit is contained in:
Sergiu Deitsch
2023-03-08 22:15:41 +01:00
parent 3cdfae110f
commit 0315c6ca9a
2 changed files with 17 additions and 2 deletions
@@ -1,5 +1,5 @@
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2022 Google Inc. All rights reserved.
// Copyright 2023 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
@@ -803,4 +803,9 @@ TEST(DynamicAutoDiffCostFunction,
EXPECT_EQ(residual, target_value);
}
TEST(DynamicAutoDiffCostFunctionTest, DeductionTemplateCompilationTest) {
// Ensure deduction guide to be working
(void)DynamicAutoDiffCostFunction(new MyCostFunctor());
}
} // namespace ceres::internal