YarikTH / ureact

Functional reactive programming library for c++
Boost Software License 1.0
155 stars 10 forks source link

Make observe method nodiscard, but for rvalue only #93

Closed YarikTH closed 3 years ago

YarikTH commented 3 years ago

Description

I personally had this problem several times. When I made observe on temporary result and expected it is called, but it isn't. Making it nodiscard should help a lot with such a problem. See https://softwareengineering.stackexchange.com/a/418309