Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No lifting for method operators #14

Open
danbst opened this issue Oct 9, 2015 · 0 comments
Open

No lifting for method operators #14

danbst opened this issue Oct 9, 2015 · 0 comments

Comments

@danbst
Copy link

danbst commented Oct 9, 2015

struct V {
  int x, y;
  V(int _x,int _y):x(_x),y(_y) { }
  V() {}
  inline const V operator+(const V& v1) const {
    return V(v1.x+x, v1.y+y);
  }
};
bool operator==(const V& lhs, const V& rhs){
  return lhs.x == rhs.x && lhs.y == rhs.y;
}

VarSignalT<V> b1 = MakeVar<GG, V>(V(1,1));
VarSignalT<V> b2 = MakeVar<GG, V>(V(1,1));
SignalT<V> b = b1 + b2;

gives

error: no viable conversion from 'TempSignal<GG, const V, react::impl::FunctionOp<const V, react::AdditionOpFunctor<V, V>, std::shared_ptr<react::impl::SignalNode<GG, V> >, std::shared_ptr<react::impl::SignalNode<GG, V> > > >' to 'SignalT<V>' (aka 'react::Signal<GG, V>')
  SignalT<V> b = b1 + b2;
                 ^~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant