$\require{cancel}$
T operator +(const T&, const T&)
T operator +(const T&, const E&)
BodyPartT operator + (BodyPartT a, size_t b); BodyPartT operator + (BodyPartT a, size_t b){ size_t offset{static_cast(a)}; BodyPartT returnValue{BodyPartT::NONE}; offset += b; if (offset <= static_cast (BodyPartT::NONE)) { returnValue = static_cast (offset); } return returnValue; }
T & operator ++ ()
// ++i
T operator ++ (int)
// i++
T & operator ++ (T & )
// ++i
T operator ++ (T &, int)
// i++
// ++i BodyPartT & operator++(BodyPartT & b) { b = b + 1; return b; } // i++ BodyPartT operator++(BodyPartT & b, int) { BodyPartT tmp{b}; b = b + 1; return tmp; }
T& operator += (const T &);
T& operator += (const E &);
T& operator += (T &, const T&)
T& operator += (T &, const E&)
a = b = c = d += e
is legal
BodyPartT & operator +=(BodyPartT & a, size_t b) { a = a + b; return a; }
T operator - () const;
T operator - (T)
BodyPartT operator -(BodyPartT b) { BodyPartT rv{BodyPartT::NONE}; size_t count{static_cast<size_t>(BodyPartT::NONE)-1}; size_t offset{static_cast<size_t>(b)}; if (count >= offset) { rv = static_cast<BodyPartT>(count-offset); } return rv; }