When build with Eclipse get warnings and errors about c++0x keywords. Example:
identifier ‘decltype’ will become a keyword in C++0x
Try this:
Project -> Properties -> C++-Build[Settings] -> G++Compiler[miscellanous] -> Other flags
Add "-std=c++0x" there.