2 ms·C++ has the nodiscard attribute for this now.by detaro 7y agoC++ has the nodiscard attribute for this now.