I would like to have a function written in C, but callable from C++ which takes a restricted pointer. This is only available in c99, so g++ doesn't like it, even in extern "C" blocks. How can I get around this limitation?
#ifdef __cplusplus
# ifdef __GNUC__
# define restrict __restrict__ // G++ has restrict
# else
# define restrict // C++ in general doesn't
# endif
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With