Код: Выделить всё
struct SomeFoo;
template
SomeFoo myfuncReturningFoo() { return SomeFoo(); }
struct SomeFoo {};
int main()
{
SomeFoo ffoo = myfuncReturningFoo();
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... on-godbolt
Код: Выделить всё
struct SomeFoo;
template
SomeFoo myfuncReturningFoo() { return SomeFoo(); }
struct SomeFoo {};
int main()
{
SomeFoo ffoo = myfuncReturningFoo();
}