diff options
Diffstat (limited to 'src/lib/utils/rotate.h')
-rw-r--r-- | src/lib/utils/rotate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/rotate.h b/src/lib/utils/rotate.h index 126a49314..b936521e6 100644 --- a/src/lib/utils/rotate.h +++ b/src/lib/utils/rotate.h @@ -18,7 +18,7 @@ namespace Botan { * @param rot the number of bits to rotate * @return input rotated left by rot bits */ -template<typename T> inline constexpr T rotate_left(T input, size_t rot) +template<typename T> inline T rotate_left(T input, size_t rot) { return (rot == 0) ? input : static_cast<T>((input << rot) | (input >> (8*sizeof(T)-rot)));; } @@ -29,7 +29,7 @@ template<typename T> inline constexpr T rotate_left(T input, size_t rot) * @param rot the number of bits to rotate * @return input rotated right by rot bits */ -template<typename T> inline constexpr T rotate_right(T input, size_t rot) +template<typename T> inline T rotate_right(T input, size_t rot) { return (rot == 0) ? input : static_cast<T>((input >> rot) | (input << (8*sizeof(T)-rot))); } |