static_list

View page source

The Base Types with Static Variables in the CppAD Library

Purpose

Shared libraries in windows Visual C++ do not handle static variables the same as other compilers. If you are using Visual C++ and cppad_static_lib is false, you can only use AD< Base > for the base types listed below; e.g., you can use AD<double> and AD< AD<double> > .

TODO

Figure out a way to avoid this limitation on base types.

CPPAD_STATIC_LIST

# define CPPAD_STATIC_LIST \
    CPPAD_STATIC_LIST_CASE(float) \
    CPPAD_STATIC_LIST_CASE(double) \
    CPPAD_STATIC_LIST_CASE(zdouble) \
    CPPAD_STATIC_LIST_CASE( std::complex<double> ) \
    CPPAD_STATIC_LIST_CASE( AD<float> ) \
    CPPAD_STATIC_LIST_CASE( AD<double> ) \
    CPPAD_STATIC_LIST_CASE( AD<zdouble> ) \
    CPPAD_STATIC_LIST_CASE( AD< std::complex<double> > )