scitokens / scitokens-cpp

A C++ implementation of the SciTokens library with a C library interface
Apache License 2.0
5 stars 22 forks source link

Add wrapper to throw compiler warning for deprecated funcs #122

Open jhiemstrawisc opened 1 year ago

jhiemstrawisc commented 1 year ago

In order to keep the scitokens.h header backwards compatible with older versions of C/C++ while still providing support for compiler warnings when a deprecated function is used, I set up a macro wrapper that checks for compiler support of the attribute and throws a warning when a deprecated function is used.

I was aiming for broad compiler compatibility. Let me know if there's anything I can change.