@@ -4942,6 +4949,20 @@ void mexFunction( int nlhs, mxArray *plhs[],
else// a regular function call
{
DLIB_CASSERT(mxIsUint64(prhs[0])&&mxGetNumberOfElements(prhs[0])==1,"When calling a class member function the first argument must be a pointer (a UINT64 in matlab)");
if(is_string(prhs[1],"clone"))
{
DLIB_CASSERT(nlhs==1,"If you want to construct a new object then you must assign the pointer to something.");
DLIB_CASSERT(mxIsDouble(prhs[1])&&mxGetNumberOfElements(prhs[1])==1,"When calling a class member function the second argument must be a number indicating which member function");