3 ms·
It's not really an idiom. The normal conversion expression is T(v) but that doesn't work if T is a pointer type, because it's parsed as *(T(v)) so the
by masklinn 5y ago
It's not really an idiom. The normal conversion expression is
T(v)
but that doesn't work if T is a pointer type, because it's parsed as
*(T(v))
so the types don't match. So you need
(*T)(v)
to ensure the type part includes the pointer specifier.