Example shows problem class use.
#include "common.hh"
#include <boost/mpl/vector.hpp>
using namespace roboptim;
#define CHECK_COPY(A, B) \
assert (&(A).function () == &(B).function ()); \
assert ((A).constraints ().size () == (B).constraints ().size ());
int run_test ()
{
problemSrc_t;
v.clear ();
problemSrc_t pbSrc (f);
{
problemSrc_t pbDst (pbSrc);
CHECK_COPY(pbSrc, pbDst);
}
{
problemDst_t pbDst (pbSrc);
CHECK_COPY(pbSrc, pbDst);
}
return 0;
}
GENERATE_TEST ()