	#include <iostream>
	using namespace std;
	
	class Foo {
	    enum OpState {
	    	None ,
	    	PlusState ,
	    	NotState ,
	    };
	
	public:
	   Foo& operator+() {
	   	   cout << "operator+()" << endl;
	       opState = PlusState;
	       return *this;
	   }
	   Foo& operator!() {
	   	   cout << "operator!()" << endl;
	       switch(opState) {
	       case PlusState:
	           operatorexclamativeplus();
	           opState = None;
	           break;       
	       default:
	           opState = NotState;
	           break;       
	       }
	       return *this;
	   }
	
	private:
	    Foo& operatorexclamativeplus() {
	   	   cout << "operatorexclamativeplus()" << endl;
           opState = None;
	   	   return *this;
	    }
	    Foo& operatorexclamativeplus(const Foo& rhs) {
	   	   cout << "operatorexclamativeplus(const Foo& rhs)" << endl;
           opState = None;
	   	   return *this;
	    }
	
	    OpState opState;
	};
	
	
	int main() {
		Foo x;
		Foo z = !+x;
		return 0;
	}