MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / AbsInPlaceWithOverflowCheck

Function AbsInPlaceWithOverflowCheck

src/function/arithmetic/abs.cpp:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11// reference from duckDB arithmetic.cpp
12template<class SRC_TYPE>
13static inline bool AbsInPlaceWithOverflowCheck(SRC_TYPE input, SRC_TYPE& result) {
14 if (input == NumericLimits<SRC_TYPE>::minimum()) {
15 return false;
16 }
17 result = std::abs(input);
18 return true;
19}
20
21struct AbsInPlace {
22 template<class T>

Callers

nothing calls this directly

Calls 1

absFunction · 0.85

Tested by

no test coverage detected