mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Provide DynamicAutoDiffCostFunction deduction guide
The deduction guide allows to avoid repeating the CostFunctor type. Change-Id: I2285de37071006a97f89988baa9b7054d82dae86
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user