MCPcopy Create free account
hub / github.com/pybind/pybind11 / abs

Function abs

tests/test_operator_overloading.cpp:133–133  ·  view source on GitHub ↗

Not a good abs function, but easy to test.

Source from the content-addressed store, hash-verified

131
132// Not a good abs function, but easy to test.
133std::string abs(const Vector2 &) { return "abs(Vector2)"; }
134
135// clang 7.0.0 and Apple LLVM 10.0.1 introduce `-Wself-assign-overloaded` to
136// `-Wall`, which is used here for overloading (e.g. `py::self += py::self `).

Callers 6

TEST_SUBMODULEFunction · 0.85
test_to_pythonFunction · 0.85
test_chrono_system_clockFunction · 0.85
operators.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected