News for hackers. Stuff that matters.
Re:What =delete means by Psychlist on Monday October 18, 2021 @06:38PM (#28912711)
> People will often make mistakes when a function has 3 or more ...

of anything. This is why non-compatible numeric subtypes are so valuable. Code like "quantity_sold = price" should not compile. You can do the same thing for other types using the same template but IME that's somewhat less common (but does happen: user_name = address!!).

It would be nice to get a variation on std::pair that works in a similar way to Rust's std::result<value, error>, because std::optional is just a dressed up boolean. I did just swipe the std::pair declaration and do that, but having it official would be nice. Especially for the non-throwing version of the standard libraries.

There are no comments on this comment yet.