You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto m1 = newTVar(10); // okauto m2 = stm::bind<TVarInt, TVarInt>(m1, [](constauto& tvar) // ok, full bind type specified
{
auto mm1 = writeTVar(tvar, 20);
returnsequence(mm1, pure(tvar));
});
auto m3 = stm::bind(m2, mReadTVar); // fail
error: no matching function for call to ‘bind(stm::church::STML<stm::TVar<int> >&, stm::church::<lambda(const auto:7&)>&)’
return bind(ma, f);
~~~~~^~~~~~~
candidate: template<class A, class B> stm::church::STML<B> stm::church::bind(stm::church::STML<A>, std::function<stm::church::STML<B>(A)>)
STML<B> bind(STML<A> ma,
^~~~~
note: template argument deduction/substitution failed:
note: ‘stm::church::<lambda(const auto:7&)>’ is not derived from ‘std::function<stm::church::STML<B>(A)>’
return bind(ma, f);
~~~~~^~~~~~~
constexpr error handling
constexprintediv (int a, int b)
{
return b == 0
? // WTF??
: a / b;
}