Lines Matching defs:const

18     Vector2(const Vector2 &v) : x(v.x), y(v.y) { print_copy_created(this); }
20 Vector2 &operator=(const Vector2 &v) { x = v.x; y = v.y; print_copy_assigned(this); return *this; }
24 std::string toString() const { return "[" + std::to_string(x) + ", " + std::to_string(y) + "]"; }
26 Vector2 operator-() const { return Vector2(-x, -y); }
27 Vector2 operator+(const Vector2 &v) const { return Vector2(x + v.x, y + v.y); }
28 Vector2 operator-(const Vector2 &v) const { return Vector2(x - v.x, y - v.y); }
29 Vector2 operator-(float value) const { return Vector2(x - value, y - value); }
30 Vector2 operator+(float value) const { return Vector2(x + value, y + value); }
31 Vector2 operator*(float value) const { return Vector2(x * value, y * value); }
32 Vector2 operator/(float value) const { return Vector2(x / value, y / value); }
33 Vector2 operator*(const Vector2 &v) const { return Vector2(x * v.x, y * v.y); }
34 Vector2 operator/(const Vector2 &v) const { return Vector2(x / v.x, y / v.y); }
35 Vector2& operator+=(const Vector2 &v) { x += v.x; y += v.y; return *this; }
36 Vector2& operator-=(const Vector2 &v) { x -= v.x; y -= v.y; return *this; }
39 Vector2& operator*=(const Vector2 &v) { x *= v.x; y *= v.y; return *this; }
40 Vector2& operator/=(const Vector2 &v) { x /= v.x; y /= v.y; return *this; }
42 friend Vector2 operator+(float f, const Vector2 &v) { return Vector2(f + v.x, f + v.y); }
43 friend Vector2 operator-(float f, const Vector2 &v) { return Vector2(f - v.x, f - v.y); }
44 friend Vector2 operator*(float f, const Vector2 &v) { return Vector2(f * v.x, f * v.y); }
45 friend Vector2 operator/(float f, const Vector2 &v) { return Vector2(f / v.x, f / v.y); }
53 int operator+(const C1 &, const C1 &) { return 11; }
54 int operator+(const C2 &, const C2 &) { return 22; }
55 int operator+(const C2 &, const C1 &) { return 21; }
56 int operator+(const C1 &, const C2 &) { return 12; }
62 size_t operator()(const Vector2 &) { return 4; }
124 .def("__add__", [](const C2& c2, const C1& c1) { return c2 + c1; })
125 .def("__radd__", [](const C2& c2, const C1& c1) { return c1 + c2; });
144 m.def("get_NestA", [](const NestA &a) { return a.value; });
155 m.def("get_NestB", [](const NestB &b) { return b.value; });
166 m.def("get_NestC", [](const NestC &c) { return c.value; });