mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Remove definition of ExpressionRef::ExpressionRef(double&);
Due to the removed definition, calling this method will result in a compile-time error instead of a run-time error. Change-Id: Iac2514c05d79a66fcbad124587d08eb9309aa6a5
This commit is contained in:
@@ -56,10 +56,14 @@ struct ExpressionRef {
|
||||
// must work for T = Jet<ExpressionRef>.
|
||||
ExpressionRef(double compile_time_constant);
|
||||
|
||||
// By adding this constructor (which always throws an error) we can detect
|
||||
// invalid usage of ExpressionRef. ExpressionRef can only be created from
|
||||
// constexpr doubles.
|
||||
ExpressionRef(double& test);
|
||||
// By adding this deleted constructor we can detect invalid usage of
|
||||
// ExpressionRef. ExpressionRef must only be created from constexpr doubles.
|
||||
//
|
||||
// If you get a compile error here, you have probably written something like:
|
||||
// T x = local_variable_;
|
||||
// Change this into:
|
||||
// T x = CERES_LOCAL_VARIABLE(local_variable_);
|
||||
ExpressionRef(double&) = delete;
|
||||
|
||||
// Create an ASSIGNMENT expression from other to this.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user