I am following this example:
http://en.cppreference.com/w/cpp/thread/sleep_for
#include <iostream>
#include <chrono>
#include <thread>
int main()
{
std::cout << "Hello waiter" << std::endl;
std::chrono::milliseconds dura( 2000 );
std::this_thread::sleep_for( dura );
std::cout << "Waited 2000 ms\n";
}
but Eclipse CDT is giving me an error (only in the intellisense, the actual code does run) on the sleep_for() line telling me:
Invalid arguments 'Candidates are:void sleep_for(const ? &)'
Do I need to tell eclipse to recognise C++11 features? It is recognising the line std::chrono::milliseconds dura( 2000 )
fine. I am using the Intel compiler v13.