5 ms·
https://godbolt.org/z/zPWr73qjc https://godbolt.org/z/zPWr73qjc Here is an implementation. This should work with all types. Unfortunate I had to annotate with
by gerbenst 5y ago
https://godbolt.org/z/zPWr73qjc https://godbolt.org/z/zPWr73qjc
Here is an implementation. This should work with all types. Unfortunate I had to annotate with restrict, but a small price to pay.
- CJefferson 5y agoI think life gets harder when you have to deal with iterators, and have to use iterator::reference (which might not be a raw C++ reference, although it almost always is in practice).