As you might have noticed, we used reinterpret_cast to allow the modulus (%) operator instead of the C-style cast ((unsigned long)iu % 8 == 0). If you are developing in C++, you're encouraged to use the named casts (static_cast, reinterpret_cast, const_cast, dynamic_cast) for two basic reasons:
- To allow the programmer to express the intent of the cast
- To make the cast safe