2 ms·
> The compiler can't reasonably do anything helpful with it _because_ of the above rules. Well, you can delegate work to a function with `__restrict` on its pa
by einpoklum 3y ago
> The compiler can't reasonably do anything helpful with it _because_ of the above rules.
Well, you can delegate work to a function with `__restrict` on its parameters, and then the compiler _can_ help you. Though you would probably need to check that the _restrict_ is valid. Still, classes should probably not do the performance heavy-lifting.
... but then again on the other hand, `__restrict` is a compiler intrinsic, not really part of C++. That's a gaping hole right there if you ask me.
- 3836293648 3y agoWell, it's a compiler intrinsic to expose a part of C that's missing in C++. It's not like it's something GCC or clang came up with. It's like `_Bool` and `_Generic`