This code below works with M$ VS2005 but fails with g++ 4.1.3. However, the unary operation works with g++ as well.
The interval class is at http://xsc.de but everything is declared as it should be. The error message of g++ is: main.cpp:9: error: no matches converting function ‘operator+’ to type ‘class cxsc::interval (*)(const class cxsc::interval&, const class cxsc::interval&)’ [...] candidates are: cxsc::interval cxsc::operator+(const cxsc::interval&, const cxsc::interval&) ------------------------------------------------------------------------------------- #include "interval.hpp" using namespace cxsc; int main() { typedef interval (*bin_op) (const interval&, const interval&); bin_op Add; Add = operator+; typedef interval (*un_op) (const interval& ); un_op Exp; Exp = exp; return 0; } _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus