#include namespace test { struct test { test() {} //private: test (const test& ) { throw -1; } }; const char* operator!= (const test&, const test& ) { return "operator!= result"; } } int main () { test::test _1; std::cout << (_1 != test::test()) << std::endl; return 0; }