fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. template < class T,
  5. class = typename std::enable_if<std::is_integral<T>::value>::type>
  6. std::string operator +(std::string& rhs, const T& lhs)
  7. {
  8. return rhs + std::to_string(lhs);
  9. }
  10.  
  11. int main() {
  12. std::string s("test");
  13. std::cout << s+'c';
  14. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
test99