Hashing in C++26
In my previous post, I showed a generic approach to hashing (see https://blog.infotraining.pl/how-to-hash-objects-without-repetition). That implementation required a tied() member that exposes an obje
Apr 7, 20269 min read2.1K
Search for a command to run...
In my previous post, I showed a generic approach to hashing (see https://blog.infotraining.pl/how-to-hash-objects-without-repetition). That implementation required a tied() member that exposes an obje
In my previous article on std::tie, I discussed how to simplify comparison operators for your classes using the std::tie() function. Now we’ll explore a more complex case. Let's create a generic imple
When we want to check the equality of objects or compare them, we need to provide appropriate comparison operators for our class. The implementation usually needs to delegate comparisons to the corresponding member variables. The typical code might l...