determining type a pointer points to.

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Aug 22 16:09:06 PDT 2009


On Sat, Aug 22, 2009 at 6:55 PM, Stewart Gordon<smjg_1998 at yahoo.com> wrote:
> div0 wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Is there a function to do this?
>> I Didn't find anything in traits or std.traits
>
> <snip>
>
> Not a function as such, but....
>
>    typeof(*p)

If p is int[], that gets you int instead of an error.  I have no idea why.


More information about the Digitalmars-d-learn mailing list