prog.cpp: In function ‘int main()’:
prog.cpp:17:13: error: no match for ‘operator=’ (operand types are ‘S’ and ‘S’)
(a + b) = c;
^
prog.cpp:17:13: note: candidate is:
prog.cpp:3:8: note: S& S::operator=(const S&) &
S& operator =(const S& rhs) & // note the final &
^
prog.cpp:3:8: note: no known conversion for implicit ‘this’ parameter from ‘S’ to ‘S&’