https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99396
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I believe std::__rot{l,r} can be used even in C++14 and if constexpr is only supported in C++17 and later. With optimizations enabled (_Nd & (_Nd - 1)) == 0 will optimize into constant anyway.