struct a { int operator+(char) {return 3;} }; int main() { a obj; decltype(obj+'z') result; result = obj + 'z'; }
Standard input is empty
prog.cpp:7: warning: identifier ‘decltype’ will become a keyword in C++0x prog.cpp: In function ‘int main()’: prog.cpp:7: error: ‘decltype’ was not declared in this scope prog.cpp:7: error: expected `;' before ‘result’ prog.cpp:8: error: ‘result’ was not declared in this scope
Standard output is empty