$\require{cancel}$
BodyPartT i; ... cout << "\t" << BodyPartTToString(i) << endl;
BodyPartT i; ... cout << "\t" << i << endl;
BodyPartT
T operator << (const T &, const E &)
cout << i << endl;
ostream
, this is parameter type T
tmp = cout << i cout = tmp cout << endl
ostream
, but it can't be a constant since we will alter the stream.
ostream
std::ostream & operator << (std::ostream & s, const BodyPartT & part)
ostream & operator << (ostream & s, const BodyPartT & part) { s << BodyPartTToString(part); return s;