Make observe method nodiscard, but for rvalue only
YarikTH opened this issue · 0 comments
YarikTH commented
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