Skip to content

No lifting for method operators #14

@danbst

Description

@danbst
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;
                 ^~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions