From: Zhangjin Wu
Sent: 06 August 2023 13:34
...
Based on your macro version, I tried to use the is_signed_type() from kernel, it seems works.
You'll find that (void *)0 isn't 'constant enough' for is_constexpr() - so is_constexpr((type)0) can be used to detect pointer types. Probably requires an 'is_pointer_type()' define. This also rather means that is_signed_type() needs to be wrapped in is_constexpr() - probably generating header file inclusion hell.
I'm going to add a comment on v3 of the patch...
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)