Annotations for C++26 Hashing
In my recent post, I demonstrated how to use static reflection from C++26 to implement generic hash computation for custom types. Let's review the final implementation. The core of the solution is the
Search for a command to run...
In my recent post, I demonstrated how to use static reflection from C++26 to implement generic hash computation for custom types. Let's review the final implementation. The core of the solution is the
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...