4 ms·
Got a link?
by bobthebuilders 5y ago
Got a link?
- ncmncm 5y agohttps://cantrip.org/swap_if.pdf https://cantrip.org/swap_if.pdf It probably depends on a core language accommodation because bitwise-swapping objects, or even primitive elements of objects, with constructors is UB. Arthur O'Dwyer's P1144 https://wg21.link/p1144 https://wg21.link/p1144 explores that territory too. Gcc has weird limits on generating CMOV instructions to implement this sort of optimization.