在进行ceres_custombundle复现进行编译时出现以下错误:
[ 33%] Built target BALProblem
[ 66%] Built target ParseCmd
[ 83%] Building CXX object CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o
In file included from /usr/local/include/ceres/internal/parameter_dims.h:37,
from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:59: error: wrong number of template arguments (6, should be 1)
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:62: error: expected unqualified-id before ‘>’ token
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:41: error: wrong number of template arguments (2, should be 1)
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:42: error: expected unqualified-id before ‘>’ token
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
91 | struct SumImpl<std::integer_sequence<T>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:38: error: template argument 1 is invalid
91 | struct SumImpl<std::integer_sequence<T>> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:39: error: expected unqualified-id before ‘>’ token
91 | struct SumImpl<std::integer_sequence<T>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
135 | std::integer_sequence<T, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: template argument 3 is invalid
135 | std::integer_sequence<T, N, Ns...>,
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: type/value mismatch at argument 4 in template parameter list for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: note: expected a type, got ‘N’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:57: error: wrong number of template arguments (3, should be 4)
146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:130:8: note: provided for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
130 | struct ExclusiveScanImpl;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:70: error: template argument 4 is invalid
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:16: error: expected nested-name-specifier
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h:44:55: error: ‘integer_sequence’ is not a member of ‘std’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:72: error: expected primary-expression before ‘int’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘template<int N, int ...Ts> constexpr const bool ceres::internal::IsValidParameterDimensionSequence’ redeclared as different kind of entity
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:16: note: previous declaration ‘constexpr const bool ceres::internal::IsValidParameterDimensionSequence’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘integer_sequence’ is not a member of ‘std’
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:27: error: expected primary-expression before ‘int’
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:40: error: expected ‘)’ before ‘>’ token
50 | std::integer_sequence<int, N, Ts...>) {
| ^
| )
/usr/local/include/ceres/internal/parameter_dims.h:49:49: note: to match this ‘(’
49 | constexpr bool IsValidParameterDimensionSequence(
| ^
/usr/local/include/ceres/internal/parameter_dims.h:69:27: error: ‘integer_sequence’ in namespace ‘std’ does not name a template type
69 | using Parameters = std::integer_sequence<int, Ns...>;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: error: there are no arguments to ‘Parameters’ that depend on a template parameter, so a declaration of ‘Parameters’ must be available [-fpermissive]
74 | IsValidParameterDimensionSequence(Parameters());
| ^~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
85 | Sum<std::integer_sequence<int, Ns...>>::Value;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/parameter_dims.h:85:43: error: template argument 1 is invalid
85 | Sum<std::integer_sequence<int, Ns...>>::Value;
| ^~
/usr/local/include/ceres/internal/parameter_dims.h:101:20: error: ‘std::integer_sequence’ has not been declared
101 | T* ptr, std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:101:36: error: expected ‘,’ or ‘...’ before ‘<’ token
101 | T* ptr, std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/internal/parameter_dims.h: In static member function ‘static std::array<T*, ceres::internal::ParameterDims<IsDynamic, Ns>::kNumParameterBlocks> ceres::internal::ParameterDims<IsDynamic, Ns>::GetUnpackedParameters(T*)’:
/usr/local/include/ceres/internal/parameter_dims.h:94:35: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
94 | using Offsets = ExclusiveScan<Parameters>;
| ^~~~~~~~~~
| ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:94:45: error: template argument 1 is invalid
94 | using Offsets = ExclusiveScan<Parameters>;
| ^
/usr/local/include/ceres/internal/parameter_dims.h:95:39: error: there are no arguments to ‘Offsets’ that depend on a template parameter, so a declaration of ‘Offsets’ must be available [-fpermissive]
95 | return GetUnpackedParameters(ptr, Offsets());
| ^~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: At global scope:
/usr/local/include/ceres/internal/variadic_evaluate.h:53:39: error: ‘std::integer_sequence’ has not been declared
53 | std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:53:55: error: expected ‘,’ or ‘...’ before ‘<’ token
53 | std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/internal/variadic_evaluate.h:66:39: error: ‘std::integer_sequence’ has not been declared
66 | std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:66:55: error: expected ‘,’ or ‘...’ before ‘<’ token
66 | std::integer_sequence<int>) {
| ^
/usr/local/include/ceres/internal/variadic_evaluate.h: In function ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*)’:
/usr/local/include/ceres/internal/variadic_evaluate.h:77:12: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
77 | std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>;
| ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:80:44: error: there are no arguments to ‘ParameterBlockIndices’ that depend on a template parameter, so a declaration of ‘ParameterBlockIndices’ must be available [-fpermissive]
80 | functor, input, output, IsDynamic(), ParameterBlockIndices());
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: At global scope:
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
217 | struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:217:69: error: template argument 1 is invalid
217 | struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
232 | struct Make1stOrderPerturbations<std::integer_sequence<int>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:232:59: error: template argument 1 is invalid
232 | struct Make1stOrderPerturbations<std::integer_sequence<int>,
| ^
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
282 | struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:282:61: error: template argument 1 is invalid
282 | struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
298 | struct Take1stOrderParts<std::integer_sequence<int>, ParameterIdx, Offset> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:298:51: error: template argument 1 is invalid
298 | struct Take1stOrderParts<std::integer_sequence<int>, ParameterIdx, Offset> {
| ^
In file included from /usr/local/include/ceres/ceres.h:42,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/cost_function_to_functor.h:160:29: error: ‘std::integer_sequence’ has not been declared
160 | std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:160:45: error: expected ‘,’ or ‘...’ before ‘<’ token
160 | std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/cost_function_to_functor.h: In member function ‘bool ceres::CostFunctionToFunctor<kNumResiduals, Ns>::operator()(const T*, Ts* ...) const’:
/usr/local/include/ceres/cost_function_to_functor.h:147:14: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
147 | std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>;
| ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:149:41: error: there are no arguments to ‘Indices’ that depend on a template parameter, so a declaration of ‘Indices’ must be available [-fpermissive]
149 | GetParameterPointers<T>(params, Indices());
| ^~~~~~~
In file included from /usr/local/include/ceres/dynamic_numeric_diff_cost_function.h:44,
from /usr/local/include/ceres/ceres.h:48,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/numeric_diff.h: At global scope:
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
445 | std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:445:78: error: template argument 2 is invalid
445 | std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
490 | std::integer_sequence<int>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:490:68: error: template argument 2 is invalid
490 | std::integer_sequence<int>,
| ^
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘constexpr const bool ceres::internal::ParameterDims<false, 9, 3>::kIsValid’:
/usr/local/include/ceres/internal/parameter_dims.h:75:17: required from ‘class ceres::internal::ParameterDims<false, 9, 3>’
/usr/local/include/ceres/sized_cost_function.h:49:47: required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/internal/parameter_dims.h:74:51: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
74 | IsValidParameterDimensionSequence(Parameters());
| ~~~~~~~~~~^~
| ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:74:40: error: ‘ceres::internal::IsValidParameterDimensionSequence’ cannot be used as a function
74 | IsValidParameterDimensionSequence(Parameters());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘class ceres::internal::ParameterDims<false, 9, 3>’:
/usr/local/include/ceres/sized_cost_function.h:49:47: required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/internal/parameter_dims.h:75:17: error: non-constant condition for static assertion
75 | static_assert(kIsValid,
| ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:131,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/sized_cost_function.h: In instantiation of ‘class ceres::SizedCostFunction<2, 9, 3>’:
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/sized_cost_function.h:53:55: error: non-constant condition for static assertion
53 | static_assert(internal::StaticParameterDims<Ns...>::kIsValid,
| ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: In instantiation of ‘bool ceres::internal::AutoDifferentiate(const Functor&, const T* const*, int, T*, T**) [with int kNumResiduals = 2; ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/autodiff_cost_function.h:210:69: required from ‘bool ceres::AutoDiffCostFunction<CostFunctor, kNumResiduals, Ns>::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8: required from here
/usr/local/include/ceres/internal/autodiff.h:315:9: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
315 | using Parameters = typename ParameterDims::Parameters;
| ^~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:348:47: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
348 | Make1stOrderPerturbations<Parameters>::Apply(parameters,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
349 | parameters_as_jets.data());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:357:39: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
357 | Take1stOrderParts<Parameters>::Apply(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
358 | num_outputs, residuals_as_jets.data(), jacobians);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: In instantiation of ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*) [with ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/internal/variadic_evaluate.h:108:45: required from ‘bool ceres::internal::VariadicEvaluate(const Functor&, const T* const*, T*) [with ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’
/usr/local/include/ceres/autodiff_cost_function.h:207:55: required from ‘bool ceres::AutoDiffCostFunction<CostFunctor, kNumResiduals, Ns>::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8: required from here
/usr/local/include/ceres/internal/variadic_evaluate.h:80:65: error: ‘ParameterBlockIndices’ was not declared in this scope
80 | functor, input, output, IsDynamic(), ParameterBlockIndices());
| ~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/ceres_customBundle.dir/build.make:63:CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:81:CMakeFiles/ceres_customBundle.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
boy@Boy:~/slambook/ch10/ceres_custombundle/build$ make
[ 33%] Built target BALProblem
[ 66%] Built target ParseCmd
Scanning dependencies of target ceres_customBundle
[ 83%] Building CXX object CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o
In file included from /usr/local/include/ceres/internal/parameter_dims.h:37,
from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:59: error: wrong number of template arguments (6, should be 1)
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:62: error: expected unqualified-id before ‘>’ token
78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:41: error: wrong number of template arguments (2, should be 1)
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
60 | struct SumImpl;
| ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:42: error: expected unqualified-id before ‘>’ token
85 | struct SumImpl<std::integer_sequence<T, N>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
91 | struct SumImpl<std::integer_sequence<T>> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:38: error: template argument 1 is invalid
91 | struct SumImpl<std::integer_sequence<T>> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:39: error: expected unqualified-id before ‘>’ token
91 | struct SumImpl<std::integer_sequence<T>> {
| ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
135 | std::integer_sequence<T, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: template argument 3 is invalid
135 | std::integer_sequence<T, N, Ns...>,
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: type/value mismatch at argument 4 in template parameter list for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: note: expected a type, got ‘N’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:57: error: wrong number of template arguments (3, should be 4)
146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:130:8: note: provided for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
130 | struct ExclusiveScanImpl;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:70: error: template argument 4 is invalid
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:16: error: expected nested-name-specifier
160 | typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h:44:55: error: ‘integer_sequence’ is not a member of ‘std’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:72: error: expected primary-expression before ‘int’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘template<int N, int ...Ts> constexpr const bool ceres::internal::IsValidParameterDimensionSequence’ redeclared as different kind of entity
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:16: note: previous declaration ‘constexpr const bool ceres::internal::IsValidParameterDimensionSequence’
44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘integer_sequence’ is not a member of ‘std’
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:27: error: expected primary-expression before ‘int’
50 | std::integer_sequence<int, N, Ts...>) {
| ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:40: error: expected ‘)’ before ‘>’ token
50 | std::integer_sequence<int, N, Ts...>) {
| ^
| )
/usr/local/include/ceres/internal/parameter_dims.h:49:49: note: to match this ‘(’
49 | constexpr bool IsValidParameterDimensionSequence(
| ^
/usr/local/include/ceres/internal/parameter_dims.h:69:27: error: ‘integer_sequence’ in namespace ‘std’ does not name a template type
69 | using Parameters = std::integer_sequence<int, Ns...>;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: error: there are no arguments to ‘Parameters’ that depend on a template parameter, so a declaration of ‘Parameters’ must be available [-fpermissive]
74 | IsValidParameterDimensionSequence(Parameters());
| ^~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
85 | Sum<std::integer_sequence<int, Ns...>>::Value;
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/parameter_dims.h:85:43: error: template argument 1 is invalid
85 | Sum<std::integer_sequence<int, Ns...>>::Value;
| ^~
/usr/local/include/ceres/internal/parameter_dims.h:101:20: error: ‘std::integer_sequence’ has not been declared
101 | T* ptr, std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:101:36: error: expected ‘,’ or ‘...’ before ‘<’ token
101 | T* ptr, std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/internal/parameter_dims.h: In static member function ‘static std::array<T*, ceres::internal::ParameterDims<IsDynamic, Ns>::kNumParameterBlocks> ceres::internal::ParameterDims<IsDynamic, Ns>::GetUnpackedParameters(T*)’:
/usr/local/include/ceres/internal/parameter_dims.h:94:35: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
94 | using Offsets = ExclusiveScan<Parameters>;
| ^~~~~~~~~~
| ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:94:45: error: template argument 1 is invalid
94 | using Offsets = ExclusiveScan<Parameters>;
| ^
/usr/local/include/ceres/internal/parameter_dims.h:95:39: error: there are no arguments to ‘Offsets’ that depend on a template parameter, so a declaration of ‘Offsets’ must be available [-fpermissive]
95 | return GetUnpackedParameters(ptr, Offsets());
| ^~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: At global scope:
/usr/local/include/ceres/internal/variadic_evaluate.h:53:39: error: ‘std::integer_sequence’ has not been declared
53 | std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:53:55: error: expected ‘,’ or ‘...’ before ‘<’ token
53 | std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/internal/variadic_evaluate.h:66:39: error: ‘std::integer_sequence’ has not been declared
66 | std::integer_sequence<int>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:66:55: error: expected ‘,’ or ‘...’ before ‘<’ token
66 | std::integer_sequence<int>) {
| ^
/usr/local/include/ceres/internal/variadic_evaluate.h: In function ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*)’:
/usr/local/include/ceres/internal/variadic_evaluate.h:77:12: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
77 | std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>;
| ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:80:44: error: there are no arguments to ‘ParameterBlockIndices’ that depend on a template parameter, so a declaration of ‘ParameterBlockIndices’ must be available [-fpermissive]
80 | functor, input, output, IsDynamic(), ParameterBlockIndices());
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: At global scope:
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
217 | struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:217:69: error: template argument 1 is invalid
217 | struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
232 | struct Make1stOrderPerturbations<std::integer_sequence<int>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:232:59: error: template argument 1 is invalid
232 | struct Make1stOrderPerturbations<std::integer_sequence<int>,
| ^
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
282 | struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:282:61: error: template argument 1 is invalid
282 | struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
298 | struct Take1stOrderParts<std::integer_sequence<int>, ParameterIdx, Offset> {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:298:51: error: template argument 1 is invalid
298 | struct Take1stOrderParts<std::integer_sequence<int>, ParameterIdx, Offset> {
| ^
In file included from /usr/local/include/ceres/ceres.h:42,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/cost_function_to_functor.h:160:29: error: ‘std::integer_sequence’ has not been declared
160 | std::integer_sequence<int, Indices...>) {
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:160:45: error: expected ‘,’ or ‘...’ before ‘<’ token
160 | std::integer_sequence<int, Indices...>) {
| ^
/usr/local/include/ceres/cost_function_to_functor.h: In member function ‘bool ceres::CostFunctionToFunctor<kNumResiduals, Ns>::operator()(const T*, Ts* ...) const’:
/usr/local/include/ceres/cost_function_to_functor.h:147:14: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
147 | std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>;
| ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:149:41: error: there are no arguments to ‘Indices’ that depend on a template parameter, so a declaration of ‘Indices’ must be available [-fpermissive]
149 | GetParameterPointers<T>(params, Indices());
| ^~~~~~~
In file included from /usr/local/include/ceres/dynamic_numeric_diff_cost_function.h:44,
from /usr/local/include/ceres/ceres.h:48,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/numeric_diff.h: At global scope:
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
445 | std::integer_sequence<int, N, Ns...>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:445:78: error: template argument 2 is invalid
445 | std::integer_sequence<int, N, Ns...>,
| ^
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
490 | std::integer_sequence<int>,
| ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:490:68: error: template argument 2 is invalid
490 | std::integer_sequence<int>,
| ^
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘constexpr const bool ceres::internal::ParameterDims<false, 9, 3>::kIsValid’:
/usr/local/include/ceres/internal/parameter_dims.h:75:17: required from ‘class ceres::internal::ParameterDims<false, 9, 3>’
/usr/local/include/ceres/sized_cost_function.h:49:47: required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/internal/parameter_dims.h:74:51: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
74 | IsValidParameterDimensionSequence(Parameters());
| ~~~~~~~~~~^~
| ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:74:40: error: ‘ceres::internal::IsValidParameterDimensionSequence’ cannot be used as a function
74 | IsValidParameterDimensionSequence(Parameters());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘class ceres::internal::ParameterDims<false, 9, 3>’:
/usr/local/include/ceres/sized_cost_function.h:49:47: required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/internal/parameter_dims.h:75:17: error: non-constant condition for static assertion
75 | static_assert(kIsValid,
| ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:131,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/sized_cost_function.h: In instantiation of ‘class ceres::SizedCostFunction<2, 9, 3>’:
/usr/local/include/ceres/autodiff_cost_function.h:154:7: required from ‘class ceres::AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132: required from here
/usr/local/include/ceres/sized_cost_function.h:53:55: error: non-constant condition for static assertion
53 | static_assert(internal::StaticParameterDims<Ns...>::kIsValid,
| ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: In instantiation of ‘bool ceres::internal::AutoDifferentiate(const Functor&, const T* const*, int, T*, T**) [with int kNumResiduals = 2; ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/autodiff_cost_function.h:210:69: required from ‘bool ceres::AutoDiffCostFunction<CostFunctor, kNumResiduals, Ns>::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8: required from here
/usr/local/include/ceres/internal/autodiff.h:315:9: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
315 | using Parameters = typename ParameterDims::Parameters;
| ^~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:348:47: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
348 | Make1stOrderPerturbations<Parameters>::Apply(parameters,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
349 | parameters_as_jets.data());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:357:39: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims<false, 9, 3>’
357 | Take1stOrderParts<Parameters>::Apply(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
358 | num_outputs, residuals_as_jets.data(), jacobians);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
from /usr/local/include/ceres/autodiff_cost_function.h:130,
from /usr/local/include/ceres/ceres.h:37,
from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: In instantiation of ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*) [with ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/internal/variadic_evaluate.h:108:45: required from ‘bool ceres::internal::VariadicEvaluate(const Functor&, const T* const*, T*) [with ParameterDims = ceres::internal::ParameterDims<false, 9, 3>; Functor = SnavelyReprojectionError; T = double]’
/usr/local/include/ceres/autodiff_cost_function.h:207:55: required from ‘bool ceres::AutoDiffCostFunction<CostFunctor, kNumResiduals, Ns>::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8: required from here
/usr/local/include/ceres/internal/variadic_evaluate.h:80:65: error: ‘ParameterBlockIndices’ was not declared in this scope
80 | functor, input, output, IsDynamic(), ParameterBlockIndices());
| ~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/ceres_customBundle.dir/build.make:63:CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:81:CMakeFiles/ceres_customBundle.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
错误原因:CMakeLists.txt文件错误,要用c++14编译。所以讲文件中c++11改为c++14即可
修改后,编译成功。