These CppAD macros are used to detect and report errors.
They are documented here because they correspond to the C++
source code that the error is reported at.
If the preprocessor symbol
these macros do nothing; i.e., they are optimized out.
The CppAD user should not uses these macros.
You can however write your own macros that do not begin with CPPAD
and that call the CppAD error handler
The CPPAD_ASSERT_KNOWN macro is used to check for an error
with a known cause.
For example, many CppAD routines uses these macros
to make sure their arguments conform to their specifications.
The CPPAD_ASSERT_UNKNOWN macro is used to check that the
CppAD internal data structures conform as expected.
If this is not the case, CppAD does not know why the error has
occurred; for example, the user may have written past the end
of an allocated array.
is a C++ source code expression
that results in a bool value that should be true.
If it is false, an error has occurred.
This expression may be execute any number of times
(including zero times) so it must have not side effects.
const char *msg
and contains a '\0' terminated character string.
This string is a description of the error
These macros use the
CppAD error handler
to report errors.
This error handler can be replaced by the user.
Input File: cppad/core/cppad_assert.hpp