dimanche 30 avril 2017

std::future in c++ with raspberry e sysroot

I'm writing a sample code to learn the asynchronos function with std::async.

My code it's very simple:

#include <iostream>
#include <future>

void error(char *msg)
{
    std::cout << msg;
}


int main(int argc, char * argv[])
{
    std::future<void> asyncr = std::async(errore,"start async");

    std::cout << "finish";
}

i think this is all correct, but my VisualStudio with VisualGDB throw an error in "asyncr":

[Clang IntelliSense] Error: implicit instantiation of undefined template 'std::future'

I lost several hours, and i want to find a solution.

I will be very grateful to those who will help me

Aucun commentaire:

Enregistrer un commentaire