[CppAD] Problem when compiling with NDEBUG

Oliver Ruepp ruepp at in.tum.de
Tue Jun 1 03:57:45 EDT 2010


Hi,

I stumbled upon a bug when trying to use CppAD (cppad-20100531) with the
NDEBUG flag set. The message I got was
"no matching function for call to ‘CheckSimpleVector...". This happes,
e.g., when trying to compile test_more/sparse_hessian.cpp with -DNDEBUG
compiler flag.

I located the problem in the check_simple_vector.hpp file. In the case
of NDEBUG (line 103), there is only a function
	template <class Scalar, class Vector>
	inline void CheckSimpleVector(void)
	{ }
defined - However a definition
        template <class Scalar, class Vector>
        void CheckSimpleVector(const Scalar& x, const Scalar& y)
        { }
is also needed, as this function is used in some other parts of CppAD.


Regards
Oliver Ruepp



More information about the CppAD mailing list