I was debugging #377 further when I noticed that several of the callback functions (Evaluate(), Gradient(), EvaluateConstraint(), and others) actually don't use the return value of the callback.
which always returns false. The fix for this was to adjust the traits for each callback type to provide ::hasBool and ::hasVoid members, and then use the return value for the ::hasBool version, just like StepTaken() does (and a couple other callbacks).
I also modified all our existing callbacks to return bool instead of void.
Once this PR is merged, the example in #377 works, and we should do a release.
I was debugging #377 further when I noticed that several of the callback functions (
Evaluate()
,Gradient()
,EvaluateConstraint()
, and others) actually don't use the return value of the callback.Any overload of those callbacks would call:
which always returns
false
. The fix for this was to adjust the traits for each callback type to provide::hasBool
and::hasVoid
members, and then use the return value for the::hasBool
version, just likeStepTaken()
does (and a couple other callbacks).I also modified all our existing callbacks to return
bool
instead ofvoid
.Once this PR is merged, the example in #377 works, and we should do a release.