Annotations for C++26 HashingIn 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 the1Apr 16 · 6 min readblog.infotraining.pl
Hashing in C++26In 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 objeApr 7 · 10 min readblog.infotraining.pl
How to Hash Objects Without Repetition: std::hash can be DRYIn 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 impleDec 6, 2024 · 6 min readblog.infotraining.pl
How to Simplify Object Comparisons with Ties in C++11/14When 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...Nov 7, 2024 · 3 min readblog.infotraining.pl