vendredi 3 janvier 2020

Return pointer to a function

using F = int(*(int))[3];

auto *bar(decltype(foo) *a) -> F
{
    return a;
}

auto bar2(decltype(foo)* a) -> F*
{
    return a;
}

Why the first function can not be compiled? I am so confused about whether the asterisk * should stick with the variable/function name or the qualifier?

Aucun commentaire:

Enregistrer un commentaire