| 93 | struct ShiftLeft { |
| 94 | template <typename T, typename Arg0, typename Arg1> |
| 95 | static T Call(KernelContext*, Arg0 lhs, Arg1 rhs, Status*) { |
| 96 | using Unsigned = typename std::make_unsigned<Arg0>::type; |
| 97 | static_assert(std::is_same<T, Arg0>::value, ""); |
| 98 | if (ARROW_PREDICT_FALSE(rhs < 0 || rhs >= std::numeric_limits<Arg0>::digits)) { |
| 99 | return lhs; |
| 100 | } |
| 101 | return static_cast<T>(static_cast<Unsigned>(lhs) << static_cast<Unsigned>(rhs)); |
| 102 | } |
| 103 | }; |
| 104 | |
| 105 | // See SEI CERT C Coding Standard rule INT34-C |
nothing calls this directly
no outgoing calls
no test coverage detected