fork download
  1. #include <iostream>
  2.  
  3. class OpTest {
  4. public:
  5. OpTest operator++ (int) {
  6. std::cout << "OpTest::operator++" << std::endl;
  7. return *this;
  8. }
  9.  
  10. OpTest& operator* () {
  11. std::cout << "OpTest::operator*" << std::endl;
  12. return *this;
  13. }
  14.  
  15. OpTest& operator= (int) {
  16. std::cout << "OpTest::operator=" << std::endl;
  17. return *this;
  18. }
  19. };
  20.  
  21. int main() {
  22. OpTest op;
  23. *op++ = 0;
  24. }
  25.  
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
OpTest::operator++
OpTest::operator*
OpTest::operator=