I'm not sure if there is a way to do that. The simplest option here might
be to create a member function and() to the class that routes to the
operator, and expose that instead?

2015-09-14 12:27 GMT+03:00 Dmitry Grechka <[email protected]>:

> Hi,
>
> I have the following c++ code which I want to expose for JS usage:
>
> class expr {
> public:
>      expr operator&&(expr const & a, expr const & b) {
>      ...
>      }
> }
>
> As JavaScript does not support operators overloading I want to to expose
> the operator as a ".and" method of the expr object to use it like
>
> a.and(b)
>
> How can I declare embind defintion of such function?
>
> Regards,
> Dmitry.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to