Using the C++ Math Library    

Renaming Functions to Avoid a Name Conflict

Casting arguments cannot resolve all the naming conflicts between the two libraries. For example, the MATLAB C++ Math Library functions char and double conflict with C++ data types. The library's clock() function doesn't take any arguments and thus can't be overloaded. Whenever a MATLAB function name conflicts with a C++ keyword, type, or built-in function, the MATLAB C++ Math Library appends _func to its name.

This table lists the functions in the library that have been renamed.

Table 9-1: Renamed Functions in the MATLAB C++ Math Library 
MATLAB Name
C++ Math Library Name
and
and_func
bitand
bitand_func
bitor
bitor_func
char
char_func
clock
clock_func
double
double_func
not
not_func
or
or_func
pascal
pascal_func (PC only)
quad
quad_func
std
std_func
struct
struct_func
union
union_func
xor
xor_func


 Casting an Argument to Avoid a Name Conflict Example Program: Rewriting roots.m in C++ (ex8.cpp)