auto*
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 6 16:51:13 PDT 2017
On Thu, Jul 06, 2017 at 11:50:24PM +0000, bauss via Digitalmars-d wrote:
[...]
> Let's say you have.
>
> auto a = foo();
>
> You have no idea what auto actually is in that case, but
>
> auto* a = foo();
>
> You know auto is a pointer of whatever foo returns.
Ah, I see. So if foo() doesn't return a pointer it will be a compile
error? So it's basically a kind of self-documentation?
T
--
INTEL = Only half of "intelligence".
More information about the Digitalmars-d
mailing list