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

Method toString

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

Source from the content-addressed store, hash-verified

39 ~Vector2() { print_destroyed(this); }
40
41 std::string toString() const {
42 return "[" + std::to_string(x) + ", " + std::to_string(y) + "]";
43 }
44
45 Vector2 operator-() const { return Vector2(-x, -y); }
46 Vector2 operator+(const Vector2 &v) const { return Vector2(x + v.x, y + v.y); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected