On Aug 21, 7:32 am, Ali <[EMAIL PROTECTED]> wrote:
> 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 athttp://xsc.debut 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;
>
> }
>
>

What's the definition of operator+? Also, provide more  details  on
namespace cxsc.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to