How can I check if a type is a pointer?

rempas rempas at tutanota.com
Sat Jun 25 14:41:29 UTC 2022


On Saturday, 25 June 2022 at 14:32:27 UTC, Ola Fosheim Grøstad 
wrote:
>
> I guess you can look at the source code for
>
> https://dlang.org/phobos/std_traits.html#isPointer

Thank you! Nice and quick ;)

For anyone interested, here's the source code:

```d
enum bool isPointer(T) = is(T == U*, U) && __traits(isScalar, T);
```

Have a nice day my friend!


More information about the Digitalmars-d-learn mailing list