mercredi 6 septembre 2017

What does mean "auto fp11() -> void(*)(const std::string&)"?

I saw the following example on http://ift.tt/1niiRpc

// simple function with a default argument, returning nothing
void f0(const std::string& arg = "world")
{
    std::cout << "Hello, " << arg << '\n';
}

// function returning a pointer to f0
auto fp11() -> void(*)(const std::string&)
{
    return f0;
}

So, What does mean -> void(*)(const std::string&) after fp11() function?

Aucun commentaire:

Enregistrer un commentaire