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:
Darius Rueckert
2019-11-21 16:16:22 +01:00
parent 5be2e48835
commit 9bb1dcb841
2 changed files with 8 additions and 9 deletions
+8 -4
View File
@@ -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.
//